Tag Management via AnyTrack
Learn how to use AnyTrack to load third party tracking tags on your website.
AnyTrack serves as a tag management platform for all integrated ad pixels connected in your AnyTrack account.
All standard events tracked by Anytrack both client side and server side are automatically mapped and sent to your ad platforms.
The building blocks of AnyTrack Tag Management:
- AnyTrack Tracking tag - the tracking tag that loads on your website.
- AnyTrack AutoTrack - A Function that automatically tracks certain events emitted by your visitor's browsers.
PageView
,OutboundClicks
,FormSubmit
,ViewContent
. - AnyTrack Conversion Tracking API - A Server Side API that receives conversions from your Conversion Sources' API (ex: Shopify, Clickfunnels, Woocommerce, Impact, Clickbank).
- AnyTrack Conversion API - A Server Side API that sends conversions to your Ad Platforms Conversion API such as the Facebook Conversion API, Google Analytics GA4 Measurement Protocol, Tiktok Web Event API, Taboola Server to Server API.
Good To know
You can find each integration's whether Ad platform or Conversion Sources in the documentation with all the events that are currently being natively tracked.
If you want to fire a tracking pixel that is not integrated in AnyTrack - for example Reddit - you can use the bind
event snippet.
Events such as outbound clicks or form submissions, you can do so by using the bind
command.
The bind
command will allow you to run a JavaScript function every time AnyTrack captures a client-side event.
Good to know:
Client-Side events such as
OutboundClick
,FormSubmit
, andAddToCart
are automatically tracked (AutoTrack) by the AnyTrack tracking tag.
How does the Bind function work:
-
Every time AnyTrack captures a client-side event such as
AddToCart
, -
The
Bind
function fires the JavaScript snippet included in the function. -
The event name you want to catch (ie.
OutboundClick
,FormSubmit
, etc..) -
A callback function will be called every time this event occurs.
This example is the Reddit Event Tracking Tag:
Warning:
- The AnyTrack Tracking Tag must be in the
head
section of your website.- The Reddit Base Pixel must be in the
head
section of your website.
AnyTrack('bind', 'OutboundClick',
function(e) {
rdt('track', 'ViewContent', {
value: e.eventValue,
currency: e.currency,
transactionId: e.clickId
});
});
Access Event Data
Each event standard properties emitted and tracked by anytrack is available and can be called.
For example, if you want to inject the eventValue
in the event tracking tag, use the function e.eventValue
.
Get the list of parameters here.
Assuming you got the following image that you want to call every time someone triggers an OutboundClick
event.
<img src="https://www.trackingpixel.foo/pixeltrack.pl?c=CLICK_ID" width="1" height="1 />
You can use the following code to trigger this pixel every time there is an OutboundClick event on your website:
AnyTrack('bind', 'OutboundClick',
function(e) {
AnyTrack('postback',
'https://www.3rdparty.foo/pixeltrack.pl?c=' +
e.clickId);
});
You can also use the Postback command in case you need to fire the pixel via Server Side API
AnyTrack('postback',
'https://t1.thirdparty.foo/xxxxx/collect?click_id={click_id}', {
brand_name: e.brand_name,
commission: e.eventValue,
transactionId: e.transactionId
});
Updated 9 months ago