How to generate a Click ID for a page view?

You can use the tracking TAG to generate Click IDs for offer links, form inputs, or even conversions.

You can use the tracking TAG to generate Click IDs for offer links, form inputs, or even custom events.

However, sometimes you want to generate a Click ID without triggering any event. This is very useful if you want to store the Click ID on the user session details and use it later on.

Generate the atclid variable

The atclid variable is a Click ID generated using the current user session without relating it to any particular event. Use the following code to generate it:

var atclid = AnyTrack('atclid');

Please note that this code will work only AFTER AnyTrack TAG was loaded on your page. In order to verify the code is already loaded, you can use the script:

You can also use it to further do something with it.

AnyTrack(function() {
var atclid = AnyTrack('atclid');

// do something with atclid...
});

How to generate the atclid value in Google Tag Manager

  1. Create a new Javascript Variable
  2. Insert the following Code & Save

Now you can use the atclid value in any of the tags within your Google Tag Manager container

function() {
    return atclid = AnyTrack('atclid');
}

 


Need support?

Questions? Problems? Need more info? Contact Anytrack Support for assistance!

Click here