Enable site tracking for your Magento Store: Difference between revisions

From Activepedia
Jump to navigation Jump to search
(SEO-optimized content from ActiveCampaign documentation)
 
(No difference)

Latest revision as of 14:46, 3 November 2025

```mediawiki Navigation: Main_Page > Integrations > Magento > Enable site tracking for your Magento Store

Enable Site Tracking for Your Magento Store[edit | edit source]

Introduction[edit | edit source]

Enabling site tracking for your Magento Store is an essential step in understanding customer behavior on your e-commerce platform. By implementing site tracking, you can gain insights into how visitors interact with your store, which products they view, and how they engage with your content. This feature is crucial for tailoring marketing strategies effectively and enhancing customer engagement. Tracking enables you to see valuable metrics that can inform your campaigns and improve your overall sales process.

This feature is available for the following plan types: Pro and Enterprise.

How to Access[edit | edit source]

To enable site tracking in your Magento store, you will need access to the backend of your Magento installation. You will be editing specific files related to the store's layout and JavaScript functionalities.

Step-by-step Instructions[edit | edit source]

Step 1: Edit the Layout File[edit | edit source]

First, you need to locate and edit the layout file that Magento uses. This file can typically be found at the following path: ``` /app/design/frontend/base/default/layout/page.xml ``` Within this file, find the section defined as: ``` <block type="page/html_head" name="head" as="head"> ``` Add the following lines within this block: ``` <action method="addJs"><script>activecampaign_track.js</script></action> <action method="addItem"><type>js</type><name>activecampaign_track.js</name></action> ```

Step 2: Name the JavaScript File[edit | edit source]

You can name the JavaScript file anything you prefer; for this guide, we will use activecampaign_track.js.

Step 3: Upload the JavaScript File[edit | edit source]

Next, you need to upload the newly created JavaScript file to your server, specifically into the js folder of your Magento installation.

Step 4: Whitelist Your Domain[edit | edit source]

Make sure to add your domain to the whitelist in your ActiveCampaign account. This step is crucial for the successful implementation of site tracking.

Step 5: Verify Installation[edit | edit source]

To confirm that the site tracking is correctly installed, you should view the network requests in your browser’s developer tools. You should see two network requests: 1. A request for the JavaScript file you added to Magento. 2. A request to prism.app-us1.com.

If the JavaScript file does not appear in the network requests, try clearing your Magento cache.

Step 6: Set Up Segments[edit | edit source]

In your ActiveCampaign account, you can set up a segment for various URLs on your Magento site. This will allow you to track who visited those specific pages.

Step 7: Send Campaigns[edit | edit source]

All that's left is to send campaigns that include links to your Magento store. With these steps completed, site tracking is now operational.

Configuration Options[edit | edit source]

- JavaScript File - The name can be customized (e.g., activecampaign_track.js). - Domain Whitelist - Ensure your domain is added to the whitelisted domains in ActiveCampaign. - Segments - Set up specific segments in ActiveCampaign to track interactions on various URLs.

Best Practices[edit | edit source]

- Regularly check that your JavaScript file is loading correctly by reviewing network requests. - Ensure to update your JavaScript file whenever you make changes to your store that affect tracking. - Keep your Magento cache cleared to avoid delays in reflecting changes. - Use segment data to refine your email campaigns and target specific customer behaviors effectively.

Troubleshooting[edit | edit source]

If you encounter issues with site tracking: - Verify that the JavaScript file is correctly named and located in the js folder. - Ensure there are no typos in the layout file that might cause errors. - Confirm that your domain is whitelisted in your ActiveCampaign settings. - Check your browser's developer console or network tab to confirm requests are being sent.

FAQ[edit | edit source]

What is site tracking?[edit | edit source]

Site tracking allows you to monitor customer interactions on your website, including page visits and product views, to optimize marketing efforts.

How do I know if site tracking is working?[edit | edit source]

You can check the browser's developer tools for network requests related to your JavaScript file and ActiveCampaign services.

Can I customize the tracking file name?[edit | edit source]

Yes, you can name the JavaScript file anything you prefer, as long as it corresponds with the layout file references.

Do I need any specific permissions to enable site tracking?[edit | edit source]

Yes, you must have access to your Magento store's backend to edit layout files and upload JavaScript.

Is site tracking available for all ActiveCampaign plans?[edit | edit source]

No, site tracking is only available for the Pro and Enterprise plans.

What happens if my website is not whitelisted?[edit | edit source]

If your domain is not whitelisted, tracking may not function correctly, and you might not receive data on customer interactions.

How can I optimize my campaigns using the site tracking data?[edit | edit source]

Use the information gathered from tracking to create targeted campaigns that focus on visitor behavior, improving overall engagement and conversion rates.

Related Features[edit | edit source]

- Integrations - Magento - Automation - Segmentation

```