Install ClickPatrol with Google Tag Manager before adding Facebook UTMs
Correct installation order is essential for accurate tracking. Always install the ClickPatrol tag, either via Google Tag Manager (GTM) or directly on your website, before you configure Facebook campaign URLs. This ensures ClickPatrol can recognise incoming traffic and block invalid clicks from day one.
Table of Contents
Add the ClickPatrol tag with Google Tag Manager
- Log in to your GTM account and open the relevant container.
- Navigate to Tags › New.
- Click Tag configuration › Custom HTML.
- Paste the ClickPatrol snippet:
<iframe src="https://monitor-001.clckptrl.com/www/?uid={YOUR_UID}"></iframe>
- Leave Support document.write unchecked and set Triggering to All pages.
- Click Save → Submit → Publish.
➡️ Once published, the tag immediately feeds ClickPatrol with real‑time behavioural data, allowing the system to learn and make precise blocking and unblocking decisions.
Alternative: embed the tag directly in your site
If you do not use GTM, place the same <iframe>
snippet just before the closing </body>
tag on every page of your site, then deploy.
Append Facebook UTMs after the tag is live
Why order matters
Facebook clicks reach your site only after the user leaves the Facebook app. When the ClickPatrol tag is already active on the landing page, it can classify each visit (legitimate or suspicious) the moment the visitor arrives. If you add Facebook UTMs before installing the tag, those first visits will lack ClickPatrol protection.
Build a UTM template in Ads Manager
- Open Meta Ads Manager and edit the campaign, ad set, or ad.
- At the ad level, scroll to Website URL.
- Click Build a URL parameter.
- Paste the recommended template:
utm_medium=cpc&utm_campaign={{campaign.name}}&utm_content={{ad.name}}&source=f&placement={{placement}}&campaign_id={{campaign.id}}&adset_id={{adset.id}}&ad_id={{ad.id}}
Key segment:
&source=f&placement={{placement}}&campaign_id={{campaign.id}}&adset_id={{adset.id}}&ad_id={{ad.id}}
This part allows ClickPatrol to attribute every click to the exact Facebook placement, campaign, ad set, and ad.
- Click Apply to insert the parameters.
- Press Publish to push the update live.
Tip on “? vs &”
• Use?
only if the landing‑page URL has no query string yet.
• Use&
when appending to a URL that already contains parameters (e.g.,?utm_source=
).
Verify events in ClickPatrol
After traffic starts flowing:
- Go to the Dashboard › Live traffic tab in ClickPatrol.
- Confirm that Facebook clicks show
source=f
and the correct campaign/ad identifiers. - Check that visits receive either a legitimate or suspicious classification within seconds.
If the data is missing, review:
- Whether the ClickPatrol tag is firing on the landing page (use GTM Preview or browser dev tools).
- That the UTM template was applied exactly as shown.
Need help?
Our support team is ready to assist with tag installation or troubleshooting. Contact us via chat or email any time.