Skip to content

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 atclid and atclidToUrl commands below require JavaScript knowledge. If you are not comfortable with code, share this guide with your developer.

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
});

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.

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

Do I need to set up PageView tracking manually?
No. The Tracking Tag tracks page views automatically once installed. The commands on this page are only needed when you want to access the Click ID value programmatically for custom integrations.
What is the difference between atclid and the Click ID from a trigger event?
The atclid command generates a Page Click ID from the current session without tying it to a specific event. The trigger command generates a Click ID that is associated with a specific event like Lead or Purchase as well as element. Both return valid Click IDs that can be used for server-side tracking.
When should I use atclidToUrl instead of a hidden form field?
Use atclidToUrl when your form builder does not support hidden field injection but can capture values from URL parameters. See the Single Page Tracking article for the full setup guide.