Skip to content

Setting up a Site ID variable

We recommend creating a Site ID variable that automatically sends traffic to your sandbox dashboard when using GTM’s preview mode. This helps keep your production dashboard free of testing data.

Prerequisites

All you need to proceed is knowledge of:

  1. Your Parse.ly Site ID(s)
  2. Your Sandbox Site ID
    • Usually in the form of sandbox.sld.tld e.g., sandbox.example.com
    • If you have multiple production Site IDs, your sandbox may take the form sandbox.publisher-name e.g., sandbox.acme-inc

Instructions

  1. Click the Configure button in the Built-In Variables sections on the Variables tab and select the checkbox beside Debug Mode.
  2. Create a User-Defined variable of Lookup Table type with {{Debug Mode}} as the input variable. Add one line specifying when the Input is true the output is your sandbox site ID. You can call the variable parsely site id to use it later.
  3. Set the Default Value to your production Site ID.
  4. Use this variable in the Parse.ly Site ID field in the tracker tag.
Google Tag Manager, variable configuration screen showing an example Site ID variable.

Next Step

With your variable set up, you may now add it to your Parse.ly tracker for your web or AMP container.

Last updated: July 25, 2024