JS Integration via GTM

Unleash User Insights with Antsomi

Ready to take your user tracking to the next level? This guide will empower you to integrate the Antsomi SDK seamlessly into your website using Google Tag Manager (GTM).

Installation

Now, let's embark on your GTM-powered user insights journey:

Step 1: Download the Antsomi Pixel Template:

Click here to download the pre-built Antsomi Pixel template for GTM. This handy template saves you time and ensures accurate tracking implementation.

Step 2: Import the Template into GTM:

  1. Access your GTM container.

GTM container dash board
  1. Click on the Templates tab.

GTM container dash board
  1. On the section Tag Template, click New.

GTM Templates UI
  1. Click on the 3-dot button to open the menu.

  2. Select Import Template.

GTM Template Editor panel
  1. Choose the downloaded Antsomi Pixel template file and click Import.

  2. Click Save to finalize the template import.

Step 3: Create Variables for Event Data:

  1. Navigate to the Variables tab in your GTM container.

GTM container dash board
  1. On the User-Defined Variables section, click New.

GTM variables dash board
  1. Choose the appropriate variable type based on the data you'll be sending (e.g., DOM Element for product ID, Page URL for product page URL).

  2. Configure the variable settings as needed, referencing any relevant data sources like URL parameters or custom JavaScript code.

GTM new variable UI
  1. Repeat steps 2-4 to create all necessary variables for your event data.

Step 4: Create a Trigger for Tracking Events:

  1. Navigate to the Triggers tab in your GTM container.

GTM container dash board
  1. On the Triggers section, click New.

GTM trigger dash board
  1. Choose the appropriate trigger type based on the event you'll be sending (e.g., Page View with Page Path contains /products).

  2. Configure the trigger settings as needed, referencing relevant data sources like URL parameters or custom JavaScript code.

GTM new trigger UI
  1. Repeat steps 2-4 to create all necessary triggers for all of your events.

Step 5: Create a Tag for Tracking Events:

  1. Back in your GTM container, click the Tags tab.

GTM container dash board
  1. On the Tags section, click New Tag.

GTM tags dash board
  1. Give your tag a descriptive name, like "Antsomi - View Product".

  2. Select the Antsomi Pixel template you just imported.

GTM new tag UI
  1. Under Settings, input your Antsomi credentials (e.g., Portal ID, Props ID, Event Action, Event Category).

GTM Antsomi Pixel setting UI
  1. To specify when this tag fires, choose the appropriate Trigger.

GTM Antsomi Pixel setting UI
  • For example, use the View Product Page trigger from step 4 to track product views.

GTM choose trigger UI
  1. Click Save to activate your tag.

Step 6: Add Variables to your Tag:

  1. Go back to your Antsomi Pixel tag in the Tags tab.

  2. For each relevant field (e.g., Main Object, Foreign Object, Event Attributes), select the corresponding variable you created in step 3.

GTM Antsomi Pixel setting UI
  • For example, the event "View Product" will be mapped as the following image:

GTM-Event relationship

From left to right:

  • GTM Antsomi Pixel setting UI

  • CDP365 Event setting UI

  • Event JSON data format

  1. Ensure all data points are mapped correctly.

  2. Click Save to complete your tag configuration.

Ready, Set, Track!

With these steps, you've successfully integrated Antsomi through GTM and empowered your website to capture valuable user insights. Remember, the provided link for the template download and illustrations for smaller steps in each section can be customized to match your specific platform and preferences.

Additional Tips:

  • Test your trigger configuration to ensure your tags fire at the intended times.

  • Review the Antsomi documentation for advanced tracking options and event customization.

  • Leverage GTM's extensive capabilities to build comprehensive tracking strategies for deeper user understanding.


Congratulations! You're on your way to uncovering invaluable customer behavior patterns and unlocking personalized experiences that drive your business forward. And as always, Antsomi is here to guide you every step of the way.

Last updated