Load dripit tracker

To start tracking with the Dripit JavaScript library, just paste the following code into the page you want to track inside the <head> and </head> tags. Make sure to change YOUR_TOKEN to your project token. You can find your project token in the settings dialog in Dripit integration page.

The snippet will load our library onto the page asynchronously to keep your website loading quickly even if placed in the of the page.

The snippet provides a global variable named dripit that you can use to send data to the Dripit API.

<!-- start Dripit -->
!function(t){!function(t,i,e,o,n,r){t[e]=t[e]||function(){(t[e].q=t[e].q||[]).push(arguments)},t.DripitGlobalObject=t[e],t.DripitGlobalObject.obj=e;var a=function(i){return function(){t.DripitGlobalObject(i,arguments)}};t.DripitGlobalObject.page=a("page"),t.DripitGlobalObject.identify=a("identify"),t.DripitGlobalObject.track=a("track"),t[e].t=1*new Date,t[e].k=n,t[e].e=r,t.DripitGlobalObject._bootstrappedConfig={},t.DripitGlobalObject.Config=function(i){t.DripitGlobalObject._bootstrappedConfig=i};var c=i.createElement("script");c.async=1,c.src=o;var p=i.getElementsByTagName("script")[0];p.parentNode.insertBefore(c,p),t.DripitGlobalObject.page()}(window,document,"dripit","https://d16ibetoxqxf3g.cloudfront.net/v2/dripit.js",t,"https://d3qifhkwnodit9.cloudfront.net/1.gif")}
<!-- end Dripit -->

Sending events

Once you have the snippet in your page, you can track an event by calling dripit.track with the event name and properties.

dripit.track('order', {
  revenue: 4000, 
  id: "2342531115"

Managing user identity

The Dripit library will assign a default unique identifier (we call it anonymous_id) to each unique user who comes to your website. This identity is saved as a cookie so that it will persist across sessions.

If you choose, you can assign your own user IDs. This allow Dripit to build your users customer journeys across different browsers and devices. To identify user use dripit.identify method.

  user_id: '124445123'

results matching ""

    No results matching ""