PHP code example of combindma / sendinblue-tracker

1. Go to this page and download the library: Download combindma/sendinblue-tracker library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

combindma / sendinblue-tracker example snippets


return [
    'tracker_id' => env('SENDINBLUE_TRACKER_ID', null),

    /*
     * The key under which data is saved to the session with flash.
     */
    'sessionKey' => env('SENDINBLUE_TRACKER_SESSION_KEY', strtolower(config('app.name')).'_sendinbluetracker'),

    /*
     * Enable or disable script rendering. Useful for local development.
     */
    'enabled' => env('ENABLE_SENDINBLUE_TRACKER', false),
];

SendinBlueTracker::identify('[email protected]');

SendinBlueTracker::event(
    'eventName',
    // Event Data
    [
      'CTA_URL' => 'https://www.example.com',
      'COST' => '20.00'
    ],
    // User Data
    [
      'EMAIL' => '[email protected]',
      'FIRSTNAME' => 'XXXXX'
    ]
);

SendinBlueTracker::flash(
    'event name',
  	// Event Data (optional)
    [
      'CTA_URL' => 'https://www.example.com',
      'COST' => '20.00'
    ],
    // User Data (optional)
    [
      'EMAIL' => '[email protected]',
      'FIRSTNAME' => 'XXXXX'
    ]
);

SendinBlueTracker::identifyPost('[email protected]',[
    'FIRSTNAME' => 'first name',
    'LASTNAME' => 'last name'
]);

SendinBlueTracker::eventPost('[email protected]', 'event name',
  	// Event Data (optional)
    [
      'CTA_URL' => 'https://www.example.com',
      'COST' => '20.00'
    ],
    // User Data (optional)
    [
      'EMAIL' => '[email protected]',
      'FIRSTNAME' => 'XXXXX'
    ],
);
bash
php artisan vendor:publish --provider="Combindma\SendinBlueTracker\SendinBlueTrackerServiceProvider" --tag="sendinblue-tracker-config"