Skip to main content

How to Install the Albacross Tracking Script on Selected Pages Using Google Tag Manager

Written by Oskar Johnson Hägglund

If you want to install the Albacross tracking script but only on selected pages, Google Tag Manager (GTM) makes this possible in a flexible way. This guide will walk you through step-by-step on how to do this.

Step-by-Step Installation Guide

Step 1: Access Google Tag Manager

  1. Select the container associated with the website where you want to install the Albacross script.

Step 2: Create a New Tag

  1. In the GTM Dashboard, navigate to Tags.

  2. Click on New to create a new tag.

  3. Name the tag something like "Albacross Tracking Tag".

Step 3: Configure the Tag

  1. Tag Type: Click on Tag Configuration.

  2. Select Custom HTML Tag.

  3. Add the Tracking Script:

    • Copy and paste the Albacross tracking script you received from your Albacross account in the HTML field or select the premade Albacross template in the GTM Library and add your client ID.

Step 4: Set Up Triggering for Selected Pages

  1. Click on Triggering to set up the pages where the script should be activated.

  2. Click on the + icon to create a new trigger.

  3. Name the trigger as "Albacross - Selected Pages Trigger".

  4. Trigger Type:

    • Choose Page View.

  5. Specify Conditions:

    • Click on "Some Page Views".

    • Here, you can specify the exact pages where the script should run. For instance:

      • Page Path matches /selected-page-1/.

      • Page URL contains /specific-section/.

    You can add multiple conditions to include all the pages you want to track with Albacross.

Step 5: Save the Tag and Trigger

  1. Click Save to finalize the tag setup.

  2. Ensure that the correct trigger is applied to the tag so it runs on the specified pages.

Step 6: Test the Tag

  1. To avoid any misconfiguration, test your setup.

  2. In Google Tag Manager, click Preview to enter the preview mode.

  3. Navigate to the pages where the Albacross tracking should be active and ensure that the tag is firing correctly.

    • You should see your tag firing on the intended pages in the Tag Assistant preview.

Step 7: Publish the Changes

  1. Once you've confirmed that everything is working as expected, click Submit in the top-right corner of Google Tag Manager.

  2. Add a version name and description, such as "Added Albacross Tracking Script to Selected Pages", then click Publish.

Tips for Success

  • Tag Accuracy: Ensure you accurately identify the pages where you want the tracking script to fire by using the correct URL conditions.

  • Testing: Always use GTM’s preview mode to verify the correct pages are tagged before publishing.

  • Triggers Flexibility: GTM allows for flexible triggers (e.g., matching URL patterns or using variables), so use these options if you have complex URL structures.

Troubleshooting

  • If the tag isn’t firing, verify the trigger conditions are set properly, and check for any typos in the URLs.

  • Make sure the Albacross script is pasted correctly without any modifications.

  • Clear your browser’s cache before testing, as old cache may sometimes prevent recent changes from being visible.

Conclusion

Using Google Tag Manager to selectively install the Albacross tracking script allows for efficient use of the tracking code without needing to add it manually to each page's source code. By following the steps outlined, you can easily track the specific pages of your site that are most important for your Albacross campaigns.

Did this answer your question?