Generate a Client ID via Server side
Learn about Generate a Client ID via Server side in AnyTrack. Set up integration for conversion tracking and campaign optimization.
You need to post the following JSON payload to the end point URL when you've successfully identified the lead or customer.
Property idUpdate the property id in order to associate the client id with the correct property.
How to Generate the cid random parameter:
cid random parameter:You can use a system like Ocodekit to create such parameter by following the instructions available here and via Make, or Zapier.
End point URL
https://t1.anytrack.io/assets/`{propertyid}`/collect{
"cid": "o5p4JFQGh1Yku4", //you must generate the clientid.
"en": "PageView",
"dl": "https://anytrack.io/?utm_source=google&utm_medium=cpc&utm_campaign=tof-campaign&utm_id=12312321&creative=123&gclid=asdf",
"dt": "Ad Tracking Platform",
"dr": "https://google.com",
"nc": 1,
"ts": "1662315001464",
"rid": "1231233434"
}| Field Name | Info | Required | Example Value |
|---|---|---|---|
| cid | Client ID: unique and random 14 alphanumeric characters. | Yes | o5p4JFQGh1Yku4 |
| en | Event Name | Yes | PageView |
| ts | Timestamp | Yes | 1662315001464 |
| nc | Determines if the client id is new. | Yes | 1 |
| dl | Document Location with full URL and query strings. | Yes | |
| dt | Document Title - The page title. | Yes | |
| rid | External ID in your database. For example your customer or lead id. | Recommended | Any unique id that can be used to resolve your customer identity and use the external id in place of the anytrack clickid. |
| utm parameters | Send the UTM parameters and any other custom parameters if they are present in the page url. | Recommended | Passing these parameters will enable better reporting in anytrack dashboard. |
Once the Client ID has been generated, you can fire any other events through the anytrack webhook endpoint using either the clickid or refid parameter
Pass standard event names and parameters to the webhook / postback with json or query string.
{
"refid": "externalid",
"click_id": "`{propertyid}``{clientid}`",
"event_name": "Lead",
"event_value": 200,
"currency": "usd",
"transactionId": "as0d98fas0d8f"
}Use cases:
Campaigns where Anytrack tracking tag can't be loaded on your website.
- Lead campaigns on Facebook
- Offline campaigns
Updated about 2 hours ago
