1. Knowledge Base
  2. Shopify and Digioh

Installing The Digioh Javascript In Shopify

The Digioh javascript will allow you to display anything in Digioh on your Shopify site (things like Pop Ups, Surveys, Embedded Forms, and of course your quiz!).

Digioh has 3 types of javascript:

  • Fast Activation (this is recommended for quizzes) - our javascript loads immediately 
  • Low Impact (this is recommended if you only use Digioh Pop Ups) - delays our javascript load until a real human interacts with your website
  • Compatibility - this is for customers who for some reason can’t get our other javascript to work due to conflicts

VIDEO: watch the video below on how Digioh's 3 types of javascripts work

Screen Shot 2024-07-22 at 1.43.16 PM

Here are the pro’s and cons for each type of javascript.

 

Additional Warning note: Make sure the Digioh Javascript is only on the site once. The entire Digioh platform is powered by one script, you will never need to do this step again. Sometimes clients add the Digioh javascript twice (once via Google Tag Manager and another time directly on the site), if the Digioh Javascript is on the site twice, Digioh will not work and cause a lot of unexpected issues on your site.

 

We offer 2 methods to get our Javascript added to Shopify:

Option 1: Directly in Shopify 

Login to your Digioh Account > Setup Instructions > Select “Fast Activation” as the javascript method and click on “Copy to Clipboard” this will copy the javascript. You will need to paste this javascript into your Shopify theme.

Screen Shot 2024-07-22 at 1.51.45 PM

Go to your Shopify admin site and click “Online Store”.

Find the “Themes” section on the left side menu tab, and after opening the “Themes” section, click the “Actions” button icon “…” on the right side of the screen and select “Edit Code”.

image9

Click the “Layout” folder to display your .liquid files list, then click on “[/] theme.liquid” to generate the code file on the right side of the screen.

image2

Find the closing </head> tag by pressing CTRL + F on Windows or Command + F on Mac and you can paste the Digioh JS Snippet just above the “</head>” section.

Option 2: Add Digioh to Google Tag Manager (follow our steps here)

The Digioh Javascript is an asynchronous load and won’t slow down your site, you will see 0 impact on site speed or performance. This is a one time install and can power everything in Digioh (Quizzes, Pop Ups, Forms and anything else you want to launch in your Digioh account)

In Google Tag Manager, click the New Tag link.

image121

 

 

 

Name your tag “Digioh”, click Tag Configuration, and select Custom HTML.

image20

In your Digioh account, click your name in the upper-right corner. Select Setup Instructions from the dropdown.

image19

 

 

 

 

 

 

 

On the next page, select “Fast Activation” and copy the code.

image77

Head back to Google Tag Manager, and paste your code in the custom HTML box.

image127

Click the Triggering box, set it to “all pages,” and save your tag.

image132

Submit your changes.

image69

 

 

 

On the next page, set a version name and short description for the change you made. Click Publish. 

image75

 

Your next step is to create a page for your quiz on your Shopify site and embed the quiz. That guide can be found here.