Integrate First Party Cookie
This document provides the steps to integrate your onsite activities with Epsilon’s First Party Cookie.
First-party cookies are small pieces of data stored by the website (or domain) that the user is currently visiting. These cookies are created and stored directly by the website itself and can only be accessed by that website.
When a user visits a website, a first-party cookie is set in their browser, which can contain various pieces of information such as a unique user identifier or data about the user's interactions on the site. This cookie persists across multiple sessions and visits, allowing the website to recognize returning users and attribute their actions over time. These IDs are available in the system for approximately 13 months.
Epsilon leverages this cookie to facilitate deeper omnichannel reporting and attribution.
Prerequisites
For the successful implementation of first-party cookie (FPC) based attribution on your sites, ensure that you’ve the following data before you integrate your onsite activities with Epsilon’s First Party Cookie:
Prepare Required Data
Make sure you have customer data, conversion data, and Epsilon Site Tags ready.
- Conversions Data: Conversion data helps in accurate attribution, enhances targeting, optimizes performance, ensures data consistency, and provides comprehensive customer insights.
- Campaign Conversion Data: Include conversion data for all purchase channels such as in-store, online, and catalog.
- All Conversions: Include all conversions from both known and unknown customers.
- Gross Sales Only: Provide only gross sales, excluding order updates or cancellations.
- Consistent Order IDs: Ensure that order IDs passed in the conversion file match the order IDs passed in the website tags.
- Epsilon Site Tags: Site tagging involves embedding tracking code into your web pages to set and read first-party cookies. This process is essential for capturing user interactions and attributing actions accurately over time.
To ensure a seamless integration, you will need to collaborate with your Customer Integration Engineer (CIE) and Integration Program Manager (IPM) teams. They will guide you through the necessary steps, including:
• Tagging Strategy: Develop a strategy to capture all relevant user interactions.
• Implementation: Embed the tracking code correctly into your web pages.
• Testing: Test thoroughly to ensure cookies are set and read correctly.
Provide Matching Attributes
The client must provide matching attributes across the following data points.
Field Description | RMN Offsite - Field Name (Location) | RMN Onsite - Field Name (Location) |
---|---|---|
Customer Identifier | mk_cust_id (in mk_file_id ) | Customer_Id (in Bigquery) |
Order Identifier | order_id (in mk_file_id ) | Retailer_Order_Id (in Bigquery) |
Product Identifier | mk_sku_id or web_sku_id (in mk_file_id ) | product_code (in Product_catalog) |
First Party Cookie ID | dtm_id (in raw_text_form_submission_log ) | dtm_cookie_id (2H release) |
Implement First Party Cookie
This section outlines the sequential steps required to successfully integrate Epsilon’s First Party Cookie (FPC) with your onsite activities, ensuring precise tracking and attribution.
Step 1: Identify and Capture the First Party Cookie
-
Determine when the FPC is set in the client's browser.
-
Locate and identify the
dtm_token
value within the cookie data.
When a new user first visits your site, the FPC will not be set. Upon the user's first navigation within your site, the First Party Cookie value will appear. You can begin using the
dtm_token
when it becomes available.
Step 2: Pass the dtm_token
in Onsite Ad Request API Calls
dtm_token
in Onsite Ad Request API Calls-
Include the
dtm_token
value in thedtmCookieId
field when making Onsite Ad Request API calls. This enables accurate tracking and attribution of user interactions. -
Additionally, pass the
CustomerId
value in theCustomerId
field to associate the cookie with a specific customer, enhancing tracking accuracy. TheCustomerId
value becomes available when the customer logs into the retailer site.Example Request
{ "sessionid": "{SESSION_ID}", // Set to value advised by your CIE. "customerid": "{CUSTOMER_ID}", // Set to CustomerId value when available. "dtmCookieId": "{DTM_TOKEN_VALUE}" // Set to dtm_token value. }
Example Response
{ "sessionid": "SESSION_1", // Set to value advised by your CIE. "customerid": "CUSTOMER_1", // Set to CustomerId value when available. "dtmCookieId": "AAAF8xLBTA968AB6TOthAAAAAAE" // Set to dtm_token value. }
For more information on Ad Request API Calls, see Generate Product Ads.
If your system uses caching to improve performance by temporarily storing data or content, it is essential to include the
dtm_token
value in all impression and click event calls. This ensures that user interactions are tracked correctly, even when data is served from the cache.
Step 2a: Handle Caching Implementation
If you have integrated caching functionality, ensure that you are sending the dtm_token
value in your impression and click event calls.
Impression Event Example
GET {integration}.citrusad.com/v1/resource/first-i/display_xc0O_S0kqwqS93k972ikrrUDagUKCAoGOTI0NTcxEgIIARoMCI7ew6AGENTCytEDIgIIAQ==?sessionId=SESSION_1&customerId=CUSTOMER_1&dtmCookieId=AAAF8xLBTA968AB6TOthAAAAAAE&event_ts=20230314200515
Click Event Example
GET {integration}.citrusad.com/v1/resource/second-c/display_xc0O_S0kqwqS93k972ikrrUDagUKCAoGOTI0NTcxEgIIARoMCI7ew6AGENTCytEDIgIIAQ==?sessionId=SESSION_1&customerId=CUSTOMER_1&dtmCookieId=AAAF8xLBTA968AB6TOthAAAAAAE&event_ts=20230314200515
Step 3: Pass the dtm_token
in Onsite Order API Calls
dtm_token
in Onsite Order API Calls- Include the
dtm_token
value in thedtmCookieId
field when making Onsite Order API calls. This helps to accurately attribute orders and conversion actions to the specific user. - Additionally, pass the
CustomerId
value in theCustomerId
field to link order data with the customer profile, facilitating more detailed reporting and analysis. The CustomerId value becomes available when the customer logs into the retailer site.
Example Response
{
"orders": [
{
"customerId": "npc-s243-ir",
"teamId": "9f48572c-0a5b-4997-9a0e-ed74f4d32dc6",
"sessionId": "5cat7-9964-4f",
"dtmCookieId": " AAAF8xLBTA968AB6TOthAAAAAAE"
"orderDate": "2021-12-02T15:00:00Z",
"id": "3h30e938-c158-4d78-a0af-b48bbwfrcss4",
"orderItems": [
{
"gtin": "9891998566P",
"quantity": 3,
"regularUnitPrice": 1.00,
"totalOrderItemPriceAfterDiscounts": 3.00,
"catalogId": "6adb93d0-7he4-4d4e-9b47-e5d3714c976a",
"citrusDiscountAmount": 0.0,
"substitutedFor": null,
"sellerId": "seller_id_601_64"
}
]
}
]
}
For more information on Ad Request API Calls, see Sync order data via AP.
Updated about 1 month ago