Dynamic link tracking with GTM

GTM event tracking for Instapage landing pages. As GTM isn’t able to natively detect some events on Instapage landing pages, we’ve put together a container that allows for dynamic tracking of any element.

With this configuration, you can make use of our triggers to fire any necessary tracking event/tag. The GTM container that you can import into your workspace includes the following variables, triggers and tags.

Importing the container and edit the variables, triggers and tags

First you have to import this GTM container that we designed in your workspace from the Admin panel. Once this is done, the file can be used to import into GTM.

NOTE: Please make sure to edit the container to have your own GTM ID after import, and not the sample one from our container.

For more information on importing a container into GTM, please follow GTM's instructions as explained in this official guide.

VARIABLES:

  • GA4 Measurement ID: used as a variable for the Configuration tag. Should be edited to include your own GA4 Measurement ID. You can also delete it and edit the tags to include the variable that you already use.

gtm id.png

  • instapage.element.id & instapage.element.id.2 - are used to display the element ID in the Data Layer.
  • instapage.ClickText - used for button CTA recognition. (do not edit)
  • instapage.PageID - used to grab the page ID. You can use it in a parameter if needed.
  • instapage.PageVariant - used to grab the variation and use it for dynamic variation tracking.
  • instapage.experimentID - used to grab the experiment ID if present.
  • instapage.ReadCookie - used to grab the page ID.

TRIGGERS:

  • instapage.button - used as a trigger for button elements
  • instapage.form - used as a trigger for form submissions
  • instapage.link - used as a trigger for hyperlinks
  • instapage.link.image - used as a trigger for image elements

TAGS:

  • GA4 - Configuration tag - Used as a dynamic tag for GA4. You can remove it if necessary.
  • instapage.image.event - used to send a GA4 event for image links. You can edit/remove the event parameters as needed (or add new ones).
  • instapage.element.id.tag - used to send the element ID (do not edit).
  • instapage.form.event - used as a dynamic tag for GA4, for form submissions. You can edit/remove the event parameters as needed (or add new ones).
  • instapage.button.event - used to send a GA4 event for button clicks. You can edit/remove the event parameters as needed (or add new ones).
  • instapage.form.tag - used to send the form submission event in the Data Layer (do not edit).
  • instapage.link.event - used to send a GA4 event for hyperlinks. You can edit/remove the event parameters as needed (or add new ones).

In order to find any individual element-id for an Instapage landing page, open the CSS style editor to find the element-ID for that particular element as seen below:

find

 

NOTE: You will need to add your event parameters as custom dimensions; otherwise they are not available in the UI of GA4. You will only see them in the Realtime report.