PageView and Click ID
Learn how AnyTrack tracks page views automatically and how to generate the atclid Click ID variable for use in forms, links, or CRM integrations. Covers the atclid command, callback syntax, Google Tag Manager setup, and the atclidToUrl method for appending the Click ID to page URLs.
PageView tracking is the automatic capture of every page load on your website by the AnyTrack Tracking Tag, generating an atclid Click ID for each session that ties subsequent events back to the originating ad click. It enriches each page load with UTM parameters, traffic source, and session data so AnyTrack can attribute conversions to the campaigns that drove them.
PageView events build a complete picture of the customer journey. Ad platforms use this journey data — combined with Event Attributes and AnyTrack’s standard events — to understand what content and messaging drives conversions.
📘 Note
PageView tracking is available on all plans, including Free.
❗ Important
The
atclidandatclidToUrlcommands below require JavaScript knowledge. If you are not comfortable with code, share this guide with your developer.
Generate the atclid Variable
Section titled “Generate the atclid Variable”The atclid command returns a Click ID generated from the current user session, without relating it to any specific event. Use this when you need the Click ID value for custom integrations:
var atclid = AnyTrack('atclid');This command only works after the Tracking Tag has loaded. To ensure the Tracking Tag is ready, wrap the call in a callback:
AnyTrack(function () { var atclid = AnyTrack('atclid'); // Use atclid value here});Generate atclid in Google Tag Manager
Section titled “Generate atclid in Google Tag Manager”Create a Custom JavaScript Variable in GTM with the following code:
function () { return AnyTrack('atclid');}The atclid value is then available as a variable in any tag within your GTM container.
Append Click ID to Page URL
Section titled “Append Click ID to Page URL”Sometimes you need to append the AnyTrack Click ID on page load. For example, when a form builder does not let you customize hidden field values, or has no hidden fields at all but can grab URL parameters.
<script> AnyTrack(function() { AnyTrack('atclidToUrl', 'custom_query_parameter'); });</script>Replace custom_query_parameter with the parameter name your form expects. The default parameter name is _atid if no custom name is provided.
For a complete guide on URL-based Click ID passing, see Single Page Tracking. To pass your own identifier as the AnyTrack Click ID, see External ID as Click ID. If a conversion is missing its Click ID, see the Integration Event Log for troubleshooting.
FAQ and Troubleshooting
FAQ was last reviewed on 2026-06-10