On This Page
Set up Conversion Tracking for Events
Install Outbrain Pixel
1. Start here: Outbrain admin > Conversions Tab > Outbrain Pixel
2. Copy the code by clicking Copy code to Clipboard.
3. Go to Shoplazza admin, click Apps > Embed data tracking snippets.
4. Click Add new, input the code name and copy the code in the Embed tracking code. Choose All for the Pages, Top for the Location, and click Save.
After the operations above, every page of your store will be reported to the “PAGE_VIEW” and can be tested by the Outbrain Pixel Tracker.
Set up Conversion Tracking for Events
Next, we will guide you to set up the tracking code for three common conversion events in the purchase funnel.
Add to Cart
First, create an Event-Based conversion named Add to Cart, and copy the following event code to the Embed data tracking snippets.
<script type="text/javascript"> try {
$(function () {
$(document.body).on('dj.addToCart', function (e, data) {
obApi('track', 'Add To Cart');
})
})
} catch(e){ }</script>

Checkout
Likewise, create an Event-Based conversion named Checkout, and copy the following event code to the Embed data tracking snippets.
<script type="text/javascript"> try {
$(function () {
$(document.body).on('dj.initiateCheckout', function (e, data) {
obApi('track', 'Checkout');
})
})
} catch(e){ }</script>
Purchase
If the Dynamic Values need to be reported, normally the Order Value and Currency, please create an Event-Based conversion named Purchase and copy the following event code to the Embed data tracking snippets.
<script type="text/javascript"> try {
$(function () {
$(document.body).on('dj.purchase', function (e, data) {
obApi('track', 'Purchase', {orderValue:data.prices.total_price, currency: data.currency_code});
})
})
} catch(e){ }</script>
After finishing the code embedding, you can set up Add to Cart, Checkout and Purchase (Orders purchase can be tested by the simulated transaction in the Bogus Gateway.), and test them with the Outbrain Pixel Tracker.
Comments
Please sign in to leave a comment.