Trigger Postbacks Programmatically
How to trigger postback url from your site using the AnyTrack TAG.
Once you have added the AnyTrack tag on your webpage, a programmer can trigger postback urls and add AnyTrack
{click_id}
for attribution automatically.<script>
AnyTrack('postback', 'https://hook.integromat.com/gnc44c?clickId={click_id}');
</script>
AnyTrack will automatically trigger that hook and replace
{click_id}
with the current user client id. If needed, it’s allowed to send more details with the webhook in the third argument:
<script>
AnyTrack('postback', 'https://hook.integromat.com/gnc44c?clickId={click_id}', {
brand_name: 'bar',
value: 59.99,
// ...
});
</script>
On some cases, it's require to extract AnyTrack client id and use it later for attribution. You can simply do so using the following code:
<script>
AnyTrack(function() {
// extract atclid once AnyTrack script is loaded
var atclid = AnyTrack('atclid');
// do something with the click id later on...
console.log('AnyTrack client:', atclid);
});
</script>
Last modified 2yr ago