Dynamic External Conversion Tracking Through GTM

If you want to track multiple landing page visits with the same checkout or thank you page, usually the checkout/thank you page will need to have 10 Instapage external conversion tracking code snippets implemented. This is cumbersome to set up and not scalable.

We designed a GTM container specifically for use with our Instapage External Conversion tracking feature.

This solution allows for a single configuration to be implemented in GTM and only enable the toggle for external conversion tracking on all landing pages that need to be tracked using this method.

How to set it up

First you will have to import the code from our container into your GTM account. We provide a direct link to the code, however, you will have to copy it and paste it into a code editor, and then save it as a JSON file. Once this is done, the file can be used to import into GTM.

The container will fire our External Conversion Tracking tag on your thank-you/checkout pages and automatically detect the page ID of the landing page that initiated the funnel.

Editing the variables and triggers

Once you've imported the GTM container, you will need to edit the following:

  • Variables:
    • Edit the "instapage.domainName" variable to match your actual domain name.
  • Triggers:
    • Edit "instapage.landing.page.trigger" trigger to match the landing page published URLs. We recommend having the filter for Page URL containing the subdomain that's used for your landing pages as if these will be published on the same subdomain, for example any URL part that is common across your landing pages should be fine to use as a filter for the trigger.
    • Edit the "instapage.conversion.page.trigger" to match your thank-you/checkout page.

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

Working examples

Editing the "instapage.domainName" variable:

In this working example we used pagedemo.co, but you need to replace pagedemo.co with your own domain name.


Editing the "instapage.landing.page.trigger" trigger:



Note: While we try to keep all of our instructional articles that involve third-party services up to date, sometimes they make changes to their platform of which we are not aware, and, as a consequence, the user interface may differ from the provided screenshots/instructions.