Dutchie
- Dutchie iframe
- Dutchie Plus
Ecommerce Event Tracking with Dutchie iframe
Fill in the
accountId
andsourceId
fields with your Surfside account ID and source ID respectively. These will be provided to you by your Surfside account manager.Add the code snippet below to the
<head></head>
section of your website website to enable web and ecommerce event tracking with Dutchie iframe.
<script>
(function() {
var surf = document.createElement('script');
surf.setAttribute('src','//cdn.surfside.io/sdk/1.0.0/wave.js');
surf.setAttribute('type','text/javascript');
surf.setAttribute('id','surfside');
surf.setAttribute('accountId','XXXXX');
surf.setAttribute('sourceId','XXXXX');
surf.setAttribute('platform','dutchie');
var sync = document.createElement('img');
sync.setAttribute('src','//edge.surfside.io/id/uid?');
sync.setAttribute('height','1');
sync.setAttribute('width','1');
sync.setAttribute('display','none');
document.head.appendChild(surf,sync);
})();
</script>
Surfside Commerce Media (SCM) with Dutchie iframe
Note: Please follow the steps below for each Dutchie iframe menu / location page you would like to enable SCM on.
Locate the Dutchie iframe embed code for the menu page you would like to enable SCM on. It should look similar to the code snippet below:
<script id="dutchie--embed__script" src="https://dutchie.com/api/v2/embedded-menu/123.js"></script>
Note the
123
in thesrc
attribute of the script tag. This is the dutchie retailer ID for the specific menu page.Create the iframe overlay code snippet, which seamlessly places the SCM ads for your iframe menu. Fill in the
accountId
,siteId
(this is the same value as sourceId),storeId
(the unique Dutchie retailer ID),headerPlacementId
, andscrollPlacementId
fields with the appropriate values provided by your Surfside Account Manager.Important: Make sure to also fill in the
data-accountid
anddata-siteid
attributes in thesurf-retail-script
script tag with the appropriate values.Note: The
headerPlacementId
andscrollPlacementId
values will be the same for each Dutchie iframe menu page.<script>
window.surfRetailOverrides = {
accountId: 'XXXXX',
channelId: 'bf9bc',
siteId: 'XXXXX',
platform: 'dutchie',
storeId: 'UNIQUE_STORE_ID', // Unique Dutchie retailer ID for the specific menu
headerPlacementId: 'XXXXX',
scrollPlacementId: 'XXXXX',
};
</script>
<div id="surf-overlay-here"></div>
<script src="//cdn.surfside.io/ads/1.0.0/renderers/overlay.js"></script>
<script id="surf-retail-script" data-accountid='XXXXX' data-siteid='XXXXX' src="//cdn.surfside.io/ads/1.0.0/r.js"></script>Combine the iframe embed code and the SCM overlay code snippet to create the final code snippet for your Dutchie iframe menu page. Place the overlay code snippet directly below the Dutchie iframe embed code. Additionally, to ensure the SCM ads do not affect the Dutchie iframe style, add the SCM overlay style code directly above the overlay code snippet.
Final code snippet:
<!-- Surfside SCM Style -->
<style>
#surf-header-section.sticky {position: relative;}
@media screen and (max-width: 992px) { #surf-header-section.sticky {position: relative;}}
</style>
<!-- Dutchie Menu Example Embed Script -->
<script id="dutchie--embed__script" src="https://dutchie.com/api/v2/embedded-menu/123.js"></script>
<!-- Begin Surfside Ads Code -->
<script>
window.surfRetailOverrides = {
accountId: 'XXXXX',
channelId: 'bf9bc',
siteId: 'XXXXX',
platform: 'dutchie',
storeId: 'UNIQUE_STORE_ID', // Unique Dutchie retailer ID for the specific menu
headerPlacementId: 'XXXXX',
scrollPlacementId: 'XXXXX',
};
</script>
<div id="surf-overlay-here"></div>
<script src="//cdn.surfside.io/ads/1.0.0/renderers/overlay.js"></script>
<script id="surf-retail-script" data-accountid='XXXXX' data-siteid='XXXXX' src="//cdn.surfside.io/ads/1.0.0/r.js"></script>Replace the original Dutchie iframe embed code with the final code snippet that includes the SCM overlay code.
Repeat the above steps for each Dutchie iframe menu page you would like to enable SCM on.
Once the SCM overlay code snippet is added to your Dutchie iframe menu page, let your Surfside Account Manager know and the Surfside Team will handle the rest!
Ecommerce Event Tracking with Dutchie Plus
To enable ecommerce event tracking for your Dutchie Plus website, follow all the steps below:
1. GTM Container Setup
Create a GTM Account
- Go to Google Tag Manager and sign in.
- Set up a new container for your Dutchie Plus website.
Install the GTM Container
- Follow the Google Tag Manager Installation Guide to add the GTM container code to your website.
- Ensure the GTM snippets are placed:
- Head snippet: Inside the
<head>
tag. - Body snippet: Immediately after the opening
<body>
tag.
- Head snippet: Inside the
Add
support@surfside.io
as a user with "Publish" permissions to your GTM account.
2. DataLayer Implementation
Follow the GTM DataLayer implementation guide to add the required dataLayer variables and triggers for ecommerce event tracking.
Necessary Ecommerce DataLayer Variables:
view_item
- Indicates that a product was viewed, documentation can be found hereadd_to_cart
- Indicates that a product was added to the cart, documentation can be found hereremove_from_cart
- Indicates that a product was removed from the cart, documentation can be found herebegin_checkout
- Indicates that the checkout process has begun, documentation can be found herepurchase
- Indicates that a purchase has been made, documentation can be found here
Once the GTM container and DataLayer variables are set up, let your Surfside Account Manager know and the Surfside Team will handle the rest!