This article lists the functions within the Data Activation base script that generate calls to tracking endpoints. For each function, an example endpoint is provided showing how the call is composed with the relevant parameter and value pairs.
With the information in this article, you can:
Understand base script functions: Learn what each function does and what data is sent to Data Activation.
Implement tracking without the base script: Get the information needed to implement Data Activation data tracking without the base script. This applies when you're implementing tracking in a native app or when you can't use the base script on your site.
UUID requirement
When using the Data Activation base script, the UUID is generated automatically. If you're using the endpoint-only implementation (for example, in an app), you need to generate the UUID within the app. The UUID must remain consistent across sessions and follow the format 8-4-4-4-12 characters between the dashes.
Example: 522a5323-b3ff-44df-8624-a22edf8d2800
Endpoints
Pageview
This function collects session information for data exports and session starts.
Function:
_st.tracking.sendPageview();Example endpoint:
https://t.svtrd.com/t-1232?i=522a5323-b3ff-44df-8624-a22edf8d2800&u=URL&s=REFERRER&p=true&pn=false&cb=1585157206208
Parameters:
t: Your site ID.
i: The UUID.
u: The URL of the current page.
s: The referrer URL.
pn: A flag (true/false) indicating whether this is the start of a session.
cb: A randomly generated cache buster.
Engagement
This function sends data included in the parameters as an engagement.
Function:
_st.tracking.sendEngagement('[EngagementType]','[CustomProperties]');Example usage:
_st.tracking.sendEngagement('ProductView',{'productid':'1630','categoryid':'249'});This retrieves data from the page and stores it as an engagement named "ProductView" with a custom property productid of value 1630 and categoryid of value 249.
Example endpoint:
https://t.svtrd.com/t-1232?i=522a5323-b3ff-44df-8624-a22edf8d2800&e=true&et=ProductView&cup=productId%3A1630&cup=categoryId%3A249&cb=1585157341997
Parameters:
t: Your site ID.
i: The UUID.
et: The name of the engagement.
cup: Each property of the engagement, added as an additional cup parameter. The format is the property name followed by an encoded : character and the value. In the example above, the engagement "ProductView" has 2 properties: productId with value 1630 and categoryId with value 249. You can add up to 32 different properties.
cb: A randomly generated cache buster.
External fact
This function sends data included in the parameters as an external or customer fact.
Function:
_st.tracking.sendExternalFact('[FactName]',[ttl],'[CustomProperties]');Example usage:
_st.tracking.sendExternalFact('LastProduct',157784630,{'LastProduct':'1630','SecondProduct':'1631'});This retrieves data from the page and stores it as a fact named "LastProduct" with two custom properties: LastProduct with value 1630 and SecondProduct with value 1631.
Example endpoint:
https://t.svtrd.com/t-1232?i=30154a8e-67ec-4437-8fde-d673c93090b5&f=true&ft=LastProduct&fttl=157784630&cup=LastProduct%3A1630&cup=SecondProduct%3A1631&cb=1585158995960
Parameters:
t: Your site ID.
i: The UUID.
ft: The name of the fact.
fttl: The time to live (TTL) for the fact, in seconds. The example above sets the fact to live for approximately 5 years.
cup: Each property of the fact, added as an additional cup parameter. The format is the property name followed by an encoded
:character and the value. You can add up to 32 different properties.cb: A randomly generated cache buster.
Conversion
This function sends conversion data included in the parameters as a conversion event. You typically call this on the conversion confirmation page.
Function:
_st.tracking.sendConversion([TransactionValue],'[CustomProperties]');Example usage:
_st.tracking.sendConversion('10000','abc','creditcard',{'cardType':'platinum'});This retrieves data from the page and stores it as a conversion. In this example, 10000 represents the credit limit, with a custom property cardType of value platinum. The user applied for a platinum credit card.
Example endpoint:
https://t.svtrd.com/t-1232?i=8e30b656-d70d-4b24-8a64-ab4162def667&c=true&cv=10000&ti=abc&cp=creditcard&cup=cardType%3Aplatinum&cb=1585070080817
Parameters:
t: Your site ID.
i: The UUID.
cv: The conversion value in cents.
ti: The transaction ID (used to prevent duplication).
cp: The conversion product.
cup: Each custom property of the conversion, added as an additional cup parameter. The format is the property name followed by an encoded : character and the value. You can add up to 32 different properties.
cb: A randomly generated cache buster.
Store mapping
This function adds an identifier to a profile and optionally merges it with existing occurrences of the same identifier.
Function:
_st.tracking.storeMapping([PartnerID],'[Identifier]',[MergeOperator]);Example usage:
_st.tracking.storeMapping(2001,'123456789',1);This retrieves the CRM user ID from the web page, stores it under partner number 2001, and finds all IDs that match the identifier to merge with this partner ID.
Example endpoint:
https://t.svtrd.com/syncResponse?ca_site=1232&ca_partner=2001&ca_cookie=30154a8e-67ec-4437-8fde-d673c93090b5&ca_read=pid&pid=123456789&cb=1585160566364&ca_merge=1
Parameters:
ca_site: Your site ID.
ca_partner: The partner type you want to map an ID to.
ca_cookie: The UUID.
pid: The identifier you want to map to this profile.
cb: A randomly generated cache buster.
ca_merge: Set to 0 for no merge, or 1 to merge back into any existing profiles that contain this identifier.
Important
This function is limited to executing once every 2 weeks for each new visitor. Data Activation enforces this by setting a timestamp for each partner ID in the visitor's cookies.
Opt out
This function opts a user out of audiences, connectors, or both. It doesn't delete any data.
Function:
_st.tracking._handleOptOut([optOutRemarketing],[optOutAdapting]);Example usage:
_st.tracking._handleOptOut(true,true);The values are true or false. When both are set to false, the user can be targeted.
Example endpoint:
https://t.svtrd.com/t-1232?i=30154a8e-67ec-4437-8fde-d673c93090b5&up=true&upr=true&upa=true&cb=1585161574517
Parameters:
t: Your site ID.
i: The UUID.
upr: Set to true to drop the profile from all audiences currently configured in the platform.
upa: Set to true to keep the profile in audiences within Data Activation but remove it from any configured connectors (integrations).
cb: A randomly generated cache buster.
Sync partner
This function initiates a cookie sync with any connector that has a cookie sync available.
Function:
_st.tracking.syncPartner([PartnerID]);Example usage:
_st.tracking.syncPartner(7);This initiates a cookie sync between Data Activation and DoubleClick (partner ID 7).
Example endpoint:
https://t.svtrd.com/s-1232?i=c9962550-1ef2-4028-99bf-4d01b400d1ab&partnerId=7&secure=true&cb=1585157000841
Parameters:
s: Your site ID.
i: The UUID.
partnerId: The partner slot in the platform for the partner (for example, DoubleClick/DV360).
cb: A randomly generated cache buster.
Important
This function is limited to executing once every 2 weeks for each new visitor. Data Activation enforces this by setting a timestamp for each partner ID in the visitor's cookies.