Signal - Getting Started

Da Vinci is a comprehensive cloud-based marketing platform that seamlessly integrates with your existing ESP. By processing millions of customer signals, Da Vinci learns and adapts from every interaction, enabling it to match the appropriate content to the right customer, creating fully personalized emails for every subscriber. The Da Vinci tracking script empowers our AI by channeling direct behavioral and conversion events to enhance marketing messages.

Our conversion script tracking uses a “last-click” approach with a lookback window. The system default is 7-days. However, that window can be customized per client to align with their ESP or business objectives. This means that if a user makes a purchase within 7 or a set number of days of clicking on an email, we will attribute the purchase to the most recent click (and, by proxy, the corresponding campaign, creative, treatments and so on). If a user makes a purchase and their most recent click was more than 7 or x set number of days ago (or if they had never clicked an email,) the conversions will not be recorded.

The tracking script is accessible through a REST API that can be utilized via a high-performance JavaScript SDK that is built for high-performance. Alternatively, you may send HTTP requests directly. To track the website, the tracking script must be installed on every page header <head>. If you have a mobile website, it is essential to add the scripts to those pages as well.

Setup checklist

For the benefit of the AI, we advise pasting the script in the header on every page of your website. The script is critical for conversion features to work correctly on order completion pages. Consult your web development or tag management team to determine the best approach for adding the script to your web pages.

  1. You must create a token to active the tracking script. You can go to Campaigns > Settings in the Da Vinci platform to create the tokens. For more information on the token, please see the "Authentication" section.
  2. If you use Tealium tag manager, you can take advantage of our integration by using it to place the script on your site. However, you must still engage your development team to establish event calls within the Tealium Data Mappings.

If you do not use Tealium, you can set up the script manually. Please refer to the JavaScript SDK for setup instructions.

Authentication

Use of Signal requires an access token. You can generate tokens in the Da Vinci platform in settings. It allows you to create tokens for a test/QA environment and a token for your live production environment. However, if you are using the Tealium integration you only have to generate a live token and Tealium will toggle the environments for you. If you don’t have Tealium and want to QA the script please create both the live and the test. Signal expects the token to be included in all API requests to the server in a header that looks like the following:

Authorization: Bearer <your token>

You can then test your access token:

curl -I -H "Authorization: Bearer token" https://track.coherentpath.com/v1/whoami

We kindly request that you update the [ACCESS_TOKEN] field in your script with the personalized test or live token that has been generated for you. Please take note that these tokens are public, and only allow for certain actions. Consequently, they can be viewed by website users who inspect your website's code. For your convenience, we recommend that you use the public token that our JavaScript SDK generates, which can be easily identified by the "public_" prefix on the token.

Public Tokens

Public tokens are not secret and only permit certain actions.These tokens can be kept visible to users who inspect the code of your website. Public token types should be used with our JavaScript SDK. You can identify public tokens by the prefix public_ on the token.

Tokens are not secret and only permit certain actions. These tokens can be kept visible to users who inspect the code of your website. Public token types should be used with our JavaScript SDK. You can identify public tokens by the prefix public_ on the token.

You should only ever use public_ type tokens on a website using our JavaScript SDK.

Test Tokens

You can optionally request a test access token from our services team. This test token can be used exactly like a normal token. The difference is that any requests made using the test token will only validate the data, not store it. Setting up use of a test token permits you to instrument your website and ensure everything works as expected before committing to data being persisted.

You can tell the difference between a test token and normal token by the prefix test_ on the token.

Errors

The Signal API uses conventional HTTP response codes to indicate the success or failure of a request. In general:

  • Codes in the 2xx range indicate success
  • Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted or invalid, etc.)
  • Codes in the 5xx range indicate an error with the Signal servers (these are rare)

Code Summary

CodeSummary
202 - AcceptedThe request has been accepted for processing. All included data is valid.
400 - Bad RequestThe request was unacceptable, often due to malformed params.
401 - UnauthorizedNo valid access token provided.
403 - ForbiddenThe access token permissions are not valid for the request
404 - Not FoundThe requested resource doesn't exist.
422 - Unprocessable EntityThe request is well-formed, however, due to semantic errors it is unable to be processed.

Structure

Errors are returned as JSON which lets you understand the nature of the error.

KeySummary
codeThe HTTP status code.
titleA title associated with the HTTP status code.
detailsA structured representation of the error.

Below is an example of a typical error returned.

{
 "error": {
   "code": 422,
   "detail": {
     "reference_id": ["can't be blank"]
   },
   "title": "Unprocessible Entity"
 }
}

FAQ’s

1. How do I test that the behavior tracking is set up correctly?

To test that Da Vinci tracking is correctly setup, inspect the website code in your Google Console and look for requests firing to track.coherentpath.com.

2. What does the Da Vinci script tag track?

It tracks the pages it is instrumented on. Your unique user identifiers must be set up to provide attribution to the proper campaign and user. When the tracking script loads for a cookied user, a 'pageview' event is automatically sent to Da Vinci containing the URL of the page visited.

We track these events:

  • Product Page View
  • Product Search
  • Order Completion
  • Order Cancelation
  • Order Refund

3. Is the script secure?

Yes, the tracking script uses SSL (HTTPS) to securely send data to Da Vinci’s servers. Please see the list of Security FAQs for more information.

4. What’s the tracking script used for?

Da Vinci’s tracking script is used to collect the browser data and certain behaviors exhibited by customers who click through directly from Da Vinci-powered emails. This data is fed back into the AI to optimize it for better results. We also pipe the conversion data into our UI so you can track your conversion and revenue amount attributed from your email program in the Analytics UI.

5. Will the script affect website load times?

Da Vinci’s tracking will not impact website load times. The script is loaded asynchronously and does not impact a user's onsite experience or loading of content. Even in an instance of degraded performance or errors, the onsite experience and content for users will be unaffected.

6. Where should I install the script on the webpage?

Install DaVinci’s script in the page header <head>. Ensure the script is in its own <script>. If you merge the script with something else, potential issues may arise.

7. How can I test the script before implementing it on my live site?

You can test the script on a QA or test environment by activating it with a “test token” and following the same process of pasting it on your site. You can check Google Console if the events are firing properly.

8. If I already have the Movable Ink conversion script installed on my site, why do I need to add the Da Vinci script as well?

The Da Vinci tracking script is built to seamlessly pass data to the Da Vinci AI that powers your email, the Movable Ink pixel is specifically for tracking the impact of Studio content. We recommend having scripts from both Da Vinci and Movable Ink installed to gain the fullest value from our services.

9. What about non-web transactions (offline and app) that the Model team requests?

For now, we will still be relying on you sending those transactions to us from a third party feed.

10. If I’m tracking two domains, can I use the same script on both domains?

Yes, but doing so will create a single event stream for behaviors exhibited across both domains. To separate behaviors by domain, create groups for each domain, then install the unique script for each group on the respective websites.

11. Do we regularly check whether the scripts are firing/producing data? How? How frequently?

Da Vinci constantly monitors aggregate statistics to ensure that they are being collected. If we notice anomalies, we will investigate. Often it’s not possible to regularly test the full conversion process since it involves buying a product or making an appointment on the client’s website.

12. For the SKU, is passing the product ID required?

For tracking conversions, at a minimum, SKUs or product IDs are required so our system can distinguish between unique products. Products with different SKUs require additional lines of information in the conversion tracking script, we recommend you use variants.

13. Will the scripts still work if customers are required to log in before making a purchase?

Yes, as long as the script is installed on the page, they will track customer activity and any conversions regardless of whether a login is required.

14. Does Da Vinci consider clicks that occur anywhere in the email?

We consider clicks anywhere in the email with a few very nuanced and very specific exceptions. For example, if a client dynamically injects links into an email in their ESP, we can’t wrap them in our tracking service. As a result, we won’t record the click so we can’t use it for conversion tracking (it also means that cp_cid is not passed which makes it hard to identify purchases made on the particular website visit).

15. What happens if a user clicks on an email, makes a purchase, and then returns to the website the next day and makes another purchase without clicking the email?

Assuming Da Vinci could identify both purchases, they would both be attributed to the same click.

Was this article helpful?

/