SHOPLINE Pixel and Customer Events
SHOPLINE Pixel helps you track and analyze customer behavior in your online store and send related customer event data to analytics tools, advertising platforms, or other business systems. This helps you evaluate marketing performance more flexibly and track important business metrics.
You can use Customer Events in SHOPLINE Admin to centrally add and manage pixel code for your store. Compared with adding code separately in theme code or checkout scripts, Customer Events helps you manage pixel code in a more centralized way. This guide explains how to access Customer Events, add and manage app pixel code and custom pixel code, and test your pixel code.
| Note: By default, Customer Events is accessible to the Store Manager. To let other staff members use it, the Store Manager must first grant them the permission under Settings > Staff and Permissions > Store settings > Customer events. |
Use Cases for SHOPLINE Pixel
You can use SHOPLINE Pixel when you want to:
- Track key customer actions in your store, such as page views, add-to-cart actions, and checkout-related events
- Send customer event data to analytics tools or advertising platforms
- Manage pixel code in a more centralized way in SHOPLINE Admin
If you are still using older tracking scripts that were manually inserted, we recommend reviewing the related code before enabling pixel code in Customer Events to avoid duplicate tracking.
Privacy Controls and Sandbox Environment
To help protect store performance and customer data, pixel code in Customer Events runs in a sandbox environment. This helps reduce interference with theme code or other scripts.
Before enabling any pixel code, make sure that its use complies with your store’s privacy policy and applicable local regulations. If you are not sure whether your existing code is suitable for this environment, consult your developer or contact SHOPLINE Support.
Accessing Customer Event to Manage Pixel Code
Follow the steps below to access and manage pixel code in SHOPLINE Admin:
- In SHOPLINE Admin, go to Settings > Customer Events.
- On the Customer Events page, you can add, view, and manage your pixel code. SHOPLINE currently supports the following two types of pixel code:
- App pixel code: Provided by apps that support SHOPLINE Pixel. It is activated automatically when you install the app, requires no coding, and runs in a strict sandbox environment. You can view and test it in Customer Events.
- Custom pixel code: Added manually by you or your developer in Customer Events. It is suited to flexible, store-specific tracking and runs in a flexible sandbox environment.
SHOPLINE Pixel can track standard events, DOM events, and custom customer events. See the next section for details.
Understanding Customer Events Supported by SHOPLINE Pixel
SHOPLINE Pixel can track three types of customer events:
- Standard events: Common shopping actions predefined by SHOPLINE, such as page views, add-to-cart actions, and completed checkouts. SHOPLINE currently supports 15 standard events (see the table below).
- DOM events: Actions customers take on a page, including clicks, text input, option changes, and form submissions.
- Custom customer events: Events your developer defines based on your business needs, used to track specific actions not covered by standard events.
The following table lists the 15 standard events and when each one is triggered:
| Standard event | When it’s triggered |
| page_viewed | A customer opens a store page and the page finishes loading. |
| product_viewed | A customer opens a product page and the page finishes loading. |
| collection_viewed | A customer opens any collection page and the page finishes loading. |
| search_submitted | A customer submits a search. |
| search_view_results | A customer views a search results page and the page finishes loading. |
| product_added_to_cart | A customer adds a product to the cart or increases its quantity in the cart. |
| product_removed_from_cart | A customer removes a product, reduces its quantity, or clears the cart. |
| cart_viewed | A customer opens the cart page. |
| checkout_started | A customer opens the checkout page. This is triggered on every visit. |
| checkout_contact_info_submitted | A customer submits their contact information at checkout. |
| payment_info_submitted | A customer submits their payment information at checkout. |
| checkout_completed | A customer places an order and the Thank You page loads. |
| lead | A customer submits an inquiry or signs up with their email address. |
| login | A customer logs in to their account. |
| registration_completed | A customer creates an account. |
For the parameters and code examples for each event, see “SHOPLINE Pixel Integration Guide: Standard events.”
Adding App Pixel Code
App pixel code is provided by apps that support SHOPLINE Pixel. It is commonly used for marketing, analytics, or event collection scenarios.
Unlike custom pixel code, which you add manually, app pixel code is configured through the app itself. After you install a supported app, its app pixel code is activated automatically and appears under Settings > Customer Events > App pixel code. Some apps may ask you to enter settings, such as an account ID, in SHOPLINE Admin. Follow the app’s instructions to complete setup.
On this tab, you can:
- View added app pixel code
- Check the current connection status
- Manage related testing actions
Adding Custom Pixel Code
Custom pixel code is custom JavaScript that you or your developer add manually in the Customer Events pixel manager in SHOPLINE Admin. It is typically used for specific third-party tracking or temporary script integration, and lets you track SHOPLINE standard customer events and send related data to your analytics tools, advertising platforms, or other systems.
Custom pixel code runs in a flexible sandbox environment; it must be maintained by the merchant or developer, including code updates, troubleshooting, and compliance checks.
For the complete list of events, event parameters, and code examples, see the “SHOPLINE Pixel Integration Guide”.
How to Add Custom Pixel Code
To add custom pixel code, follow these steps:
|
Important: Before adding custom pixel code, check whether your store already has tracking scripts for the same purpose. Remove or update them as needed to avoid duplicate tracking. You can review your theme code, checkout scripts, or other locations where tracking code may have been previously added. |
- In SHOPLINE Admin, go to Settings > Customer Events.
- In the Pixel code section, click Add a custom pixel code, then enter a unique pixel code name and save it.
- Configure customer privacy settings and enter your pixel code in the editor.
- Click Save to save the custom pixel code.
How to Connect Custom Pixel Code
If you are confident that the added custom pixel code complies with SHOPLINE Privacy Policy, you can connect the pixel code to your store to ensure it starts working. There are two ways to connect:
Option 1:
- In SHOPLINE Admin, go to Settings > Customer Events, then click the pixel code you want to connect.
- Click Connect in the top right corner.
Option 2:
- In SHOPLINE Admin, go to Settings > Customer Events.
-
In the pixel code list, find the custom pixel code you want to connect and click the More option icon (···) in the Options column, then select Connect.
How to Disconnect Custom Pixel Code
Disconnecting a custom pixel code stops the tracking activity of that pixel code.
- In SHOPLINE Admin, go to Settings > Customer Events.
- In the Custom pixel code list, only pixel codes with the Connected status can be disconnected.
-
Click the More option icon (···) in the Options column and select Disconnect.
How to Edit Custom Pixel Code
You can edit the content or name of a custom pixel code whether it is connected or not.
Edit pixel code content
- In SHOPLINE Admin, go to Settings > Customer Events.
- Search for the pixel code you want to edit in the search bar, or click the pixel code name directly in the list to open the edit page.
- Make changes in the sandbox area.
- Click Update.
Edit pixel code name
- In SHOPLINE Admin, go to Settings > Customer Events.
- In the Custom pixel code list, find the pixel code you want to rename.
- Click the More option icon (···) in the Options column and select Edit pixel code name.
- Change the pixel code name, then click Save.
How to Delete Custom Pixel Code
You can delete custom pixel codes that you no longer need or that are causing errors.
| Note: Deleting a custom pixel code cannot be undone, so ensure that you execute it correctly before proceeding. |
- In SHOPLINE Admin, go to Settings > Customer Events.
- IIn the Custom pixel code list, find the pixel code you want to delete and click the More option icon (···) in the Options column, then select Delete.
Migrating Existing Tracking Code to Pixel Code
If your store previously used tracking scripts added in theme files or other custom code locations, you can consider moving them to Customer Events for more centralized management.
Before migrating, make sure that the same tracking logic is not still kept elsewhere in your store. Do not keep the same code in multiple places at the same time, as this may lead to duplicate event reporting.
If you need to migrate existing scripts to custom pixel code, or confirm whether an app supports app pixel code, we recommend checking with your developer or app provider first.
| Note: Before migrating, we recommend that your developer review the “SHOPLINE Pixel Integration Guide” to confirm that the events and parameters you need are supported. |
Testing Pixel Code
After setting up pixel code, you can use the Test feature to check whether related customer events have been subscribed to correctly.
Follow the steps below:
- In SHOPLINE Admin, go to Settings > Customer Events.
- Depending on the type of pixel code you want to check, switch to the Custom pixel code or App pixel code tab.
- Find the pixel code you want to test, click More option icon (···) in the Options column, and select Test.
Frequently Asked Questions About SHOPLINE Pixel
Q: Which customer events can SHOPLINE Pixel track?
SHOPLINE Pixel can track standard events, DOM events, and custom customer events. For details, see “SHOPLINE Pixel Integration Guide: Customer events.”
Q: Where can I find event parameters and code examples?
The parameters for each standard event, along with code examples for both app pixel code and custom pixel code, are available in “SHOPLINE Pixel Integration Guide: Standard events.”
Q: Does my developer need to add setup code when writing custom pixel code?
No. SHOPLINE Pixel is preloaded in the Customer Events code editor, so your developer can subscribe to events directly without any additional setup. For code examples, see “SHOPLINE Pixel Integration Guide: Custom pixel.”
Q: Can I track when customers click a specific button?
Yes. DOM events let you track clicks, text input, option changes, and form submissions on your store pages. For details, see “SHOPLINE Pixel Integration Guide: DOM events.”
Q: Can I track customer actions that aren’t covered by standard events?
Yes. Your developer can define and publish custom customer events, then subscribe to them in your pixel code. For details, see “SHOPLINE Pixel Integration Guide: Custom customer events.”