Copy your client key
In pagent, open the install step, or Settings → Setup later on, and copy your client key from the snippet: the value ofdata-client-key.
Add pagent as a tag
1
Create a tag
In your container, go to Tags → New → Tag Configuration and choose Custom HTML.
2
Paste the snippet
Paste this code into the HTML field and replace Use this instead of the plain snippet. Tag Manager can drop the snippet’s
YOUR_CLIENT_KEY with your client key:data- settings, and pagent needs them to start.3
Fire it as early as possible
Under Triggering, choose Initialization - All Pages. It fires before your other page view tags.
4
Save and publish
Save the tag, then click Submit and Publish.
If your container uses consent settings, the tag may only fire after a visitor accepts your cookie banner. See the consent guide for how pagent handles consent.
Check it worked
- Open your site in a private browser window, so no cached version shows.
- Back in pagent, click Check connection in the install step. If you’ve finished setup already, open Settings → Setup: it shows You are ready once pagent has received visits from your site.
- pagent loads your live site and looks for the snippet. When it finds it, you can start your first test.