# Pixel Script

Pixel Script is an essential component of the NextBee Loyalty Program. It is a piece of code that is placed on the client's website to track customer activity and monitor the progress of the loyalty program.

The Pixel Script tracks customer activities such as purchases, referrals, social media shares, and other interactions with the client's website. This allows businesses to monitor customer behavior and tailor their loyalty program to meet the specific needs of their customers.

In addition to tracking customer activities, Pixel Script also enables businesses to monitor the progress of their loyalty program. This includes tracking the number of points earned by customers, the number of rewards redeemed, and other key metrics that are essential for measuring the success of the loyalty program.

# List View

The Pixel Script List View displays a list of all the Pixel Scripts configured for the NextBee Loyalty Program. It includes columns for ID, Name, Module Type, and Status, as well as an Action column.

The Action column in the Pixel Script List View navigates to the Details View of the Pixel Script. This allows you to view the details of the Pixel Script, including the configuration

In the top right corner of the Pixel Script List View, there is a button for adding a new Pixel Script configuration. This allows you to create a new Pixel Script and configure it to meet the specific needs of your loyalty program.

The Pixel Script List View also includes features for filtering records and pagination. This allows you to easily navigate through the list of Pixel Scripts and find the specific Pixel Script you need.

With the Pixel Script List View, you can manage all the Pixel Scripts configured for your NextBee Loyalty Program. This allows you to monitor customer activities and track the progress of your loyalty program, ensuring that you can tailor the program to meet the specific needs of your customers and measure its success.

# Create New Pixel Script

To create a new Pixel Script for the NextBee Loyalty Program, you must first navigate to the Pixel Script List View and click the "Add New" button. This will take you to the Create New Pixel Script form.

The Create New Pixel Script form includes several fields that must be filled out, including the Name and Pixel Type. The Pixel Type can be one of several options, including Purchase Transaction, Newsletter Subscription, App Activity Tracking, or other Activity Types.

Once an Activity Type is selected, a dropdown list of related activities will appear for you to choose from. Depending on the selection of the Pixel Type, additional fields will be required to be filled out.

If Purchase Transaction is selected, you will be required to fill out fields such as Email, Member ID, First Name, and Transaction ID. If Newsletter Subscription Tracking is selected, you will only need to fill out fields such as Email and Transaction ID.

If App Activity Tracking is selected, you will need to fill out fields such as Email, Numeric Value, and Transaction ID. In all cases, there is a chance that you may need to add Additional Variables required based on business logic.

Once all of the required fields have been filled out, you can submit the Pixel Script for creation. The newly created Pixel Script will be added to the list of Pixel Scripts and can be viewed and edited from the Details View.

With the Create New Pixel Script form, you can create new Pixel Scripts that can track customer activities, such as purchases, subscriptions, and app activities. This allows you to monitor customer behavior and tailor your loyalty program to meet the specific needs of your customers.

# Pixel Script Details

The Pixel Script Details View displays the details of a specific Pixel Script for the NextBee Loyalty Program. It includes information such as the Name, Pixel Type, and configuration settings for the Pixel Script.

In addition to the general information, the Pixel Script Details View also includes a list of the members who have triggered the Pixel Script. This allows you to view the specific customer activities that have been tracked by the Pixel Script and monitor the progress of your loyalty program.

The Pixel Script Details View also includes an Edit button that allows you to modify the configuration settings of the Pixel Script. This allows you to make any necessary changes to the Pixel Script and ensure that it is properly configured to meet the specific needs of your loyalty program.

# Edit Pixel Script

To edit an existing Pixel Script for the NextBee Loyalty Program, you must first navigate to the Pixel Script List View and click the "Edit" button next to the specific Pixel Script that you want to modify. This will take you to the Edit Pixel Script form.

The Edit Pixel Script form contains two sections.

# Pixel Configuration Tab

The first section is the Pixel Configuration section, which displays all of the fields captured in edit mode. You can update any of the fields or add more additional variables as needed.

# Tracking Pixel Script Tab

The second section is the Tracking Pixel Script tab, which contains an example HTML page that calls the Pixel Script with an additional JavaScript snippet. You will need to add this script to your HTML code as shown in the example page and follow the instructions to make it work correctly.

In the Pixel Configuration section, you can modify the configuration settings for the Pixel Script, including the Name, Pixel Type, Activity Type, and any additional variables that may be required. Once you have made the necessary changes, you can save the modified Pixel Script and it will be updated in the Pixel Script List View.

In the Tracking Pixel Script tab, you can view an example HTML page that demonstrates how to call the Pixel Script using an additional JavaScript snippet. This snippet is necessary to properly track customer activity on your website and ensure that the Pixel Script is functioning correctly.

With the Edit Pixel Script form, you can modify the configuration settings for an existing Pixel Script and ensure that it is functioning correctly on your website. This allows you to monitor customer activity and tailor your loyalty program to meet the specific needs of your customers.

# Pixel Integration

To integrate the NextBee Loyalty Program Pixel into your web page, you must first add the pixel.js script to your web page. Once you have added the script, you will have access to the JavaScript object NBPixel.

To add the required attributes to the NBPixel object, you can use the following code as an example:

NBPixel.firstName = "Firstname";
NBPixel.lastName = "Lastname";
NBPixel.email = "your.customer@example.com";

Replace the example values with the actual values for your customer's first name, last name, and email address.

After adding all of the required data to the NBPixel object, you can call the renderPixel() function to send the web page data to the NextBee Loyalty Program. This function requires an encrypted code provided by NextBee, which will ensure that the data is transmitted securely.

NBPixel.renderPixel(<The encrypted code provided by NextBee>);

The renderPixel() function will send your web page data to the NextBee Loyalty Program, whether it is related to a purchase, activity, or any other type of customer behavior that you have configured the Pixel for.

By integrating the NextBee Loyalty Program Pixel into your web page, you can track customer behavior and monitor the success of your loyalty program. This allows you to tailor your loyalty program to meet the specific needs of your customers and increase customer engagement and loyalty.