Skip to content

Implementing Snowplow Web

Info

This implementation is meant for sites currently using their own Adobe Analytics solution or participating on our WOGAA SPARKS program.

Warning

Do not reshare this document with anyone unless they need to implement WOGAA tracking on their websites.

Getting Started

As a best practice, you should test the code on your staging environment before deploying it on your production environment.

In the following sections we will take you through the steps to setup both your staging and production environments.


Setup Staging Environment

Insert tracking code

Insert the following code into the <head> of every page of your website, before other scripts.

<script src="https://assets.dcube.cloud/scripts/wogaa.js"></script>

Example

<html>
<head>
  ...
  <script src="https://assets.dcube.cloud/scripts/wogaa.js"></script>
</head>
...
</html>

Info

The base code does not support subresource integrity (SRI). Please do not enable SRI for base code.

Content Security Policies for Staging

Info

This step is optional if your website doesn't have Content Security Policy enabled.

If your website has Content Security Policy enabled, update your CSP with the following code:

default-src 'self' https://*.dcube.cloud/ https://*.demdex.net/ https://cm.everesttech.net/ https://wogadobeanalytics.sc.omtrdc.net/;
script-src 'self' blob: https://*.dcube.cloud https://assets.adobedtm.com/;
img-src 'self' data: https://wogadobeanalytics.sc.omtrdc.net/ https://cm.everesttech.net/ https://dpm.demdex.net/;
connect-src 'self' https://*.dcube.cloud https://dpm.demdex.net/;
style-src 'self' 'unsafe-inline' https://assets.dcube.cloud/fonts/;
font-src 'self' data: https://assets.dcube.cloud/fonts/;

Verify Staging

We will need the Chrome extension Snowplow Chrome Extension to verify the base code

  1. Install Snowplow Chrome Extension
  2. On Chrome, navigate to the website with the base code installed.
  3. Right-click on the page and click Inspect
  4. Inside the Inspect console, click on the Snowplow Tab, image of snowplow tab in console
  5. Refresh the page where the base code is installed, or navigate to a few tabs and see that Pageview event is populated.
  6. Select on one of the Pageview event and you should see the image below Staging Snowplow Event

    • Note:
      • APP name is wogaa<websitename>staging
      • Collector address is snowplow.dcube.cloud
  7. Take a screenshot and save it for Step 4.

Send the image to WOGAA for Staging

Please fill in the template below and email WOGAA TechOps at wogaa_ops@tech.gov.sg.

  • Informational Service Name:
  • Informational Service URL:
  • Environment: Staging
  • Attachment: Screenshot taken in previous step

Setup Production Environment

Insert tracking code

Insert the following code into the <head> of every page of your website, before other scripts.

<script src="https://assets.wogaa.sg/scripts/wogaa.js"></script>

Example

<html>
<head>
  ...
  <script src="https://assets.wogaa.sg/scripts/wogaa.js"></script>
</head>
...
</html>

Info

The base code does not support subresource integrity (SRI). Please do not enable SRI for base code.

Content Security Policies for Production

Info

This step is optional if your website doesn't have Content Security Policy enabled.

If your website has Content Security Policy enabled, update your CSP with the following code:

default-src 'self' https://*.wogaa.sg https://*.demdex.net/ https://cm.everesttech.net/ https://wogadobeanalytics.sc.omtrdc.net/;
script-src 'self' blob: https://*.wogaa.sg https://assets.adobedtm.com/;
img-src 'self' data: https://wogadobeanalytics.sc.omtrdc.net/ https://cm.everesttech.net/ https://dpm.demdex.net/;
connect-src 'self' https://*.wogaa.sg https://dpm.demdex.net/;
style-src 'self' 'unsafe-inline' https://assets.wogaa.sg/fonts/;
font-src 'self' data: https://assets.wogaa.sg/fonts/;

Verify Production

We will need the Chrome extension Snowplow Chrome Extension to verify the base code

  1. Install Snowplow Chrome Extension
  2. On Chrome, navigate to the website with the base code installed.
  3. Right-click on the page and click Inspect
  4. Inside the Inspect console, click on the Snowplow Tab, image of snowplow tab in console
  5. Refresh the page where the base code is installed, or navigate to a few tabs and see that Pageview event is populated.
  6. Select on one of the Pageview event and you should see the image below Production snowplow event

    • Note:
      • APP name is wogaa<websitename>prod
      • Collector address is snowplow-web.wogaa.sg
  7. Take a screenshot and save it for later.

Send screenshot to WOGAA

Send the image to WOGAA for Production

Please fill in the template below and email WOGAA TechOps at wogaa_ops@tech.gov.sg

  • Informational Service Name:
  • Informational Service URL:
  • Environment: Production
  • Attachment: Screenshot taken in previous step.