Add Ondema Button snippet code to site

Adding the snippet code to your site is simple (even if you don’t know how to code).

For HTML

1. Go to your Ondema snippet page at your campaign overview and copy the code

2. Ideally, you should add your snippet code anywhere between <footer> and </footer> or right before your closing body tag, </body>.

If needed you can also add it anywhere in your code but is less recommended.

For WordPress

Option 1: Use a plugin

1. Install the free plugin: SOGO Add Script Header Footer .

2. Go to your Ondema snippet page at your campaign overview and copy the code

3. Go to your page or post edit in the admin panel of your WordPress site.

4. Under the "OH add script" tab, add the snippet code to the section which says "Add script to be added to the footer of the page "

5. Add a class called "img-for-ondema-widget" to the HTML images tag you want the Ondema Button to appear on.

Option 2: Add directly to the Header.PHP file

1. Go to "Appearance", then "Editor", then "Header.PHP".

2. Search for </head>.

3. Paste the snippet code before the closing </head> tag.

4.Add a class called "img-for-ondema-widget" to the HTML images tag you want the Ondema Button to appear on.

5. Save the code by clicking "Update File".

Selectors

**There is a option to "catch" images with any selector (like in jQuery selectors https://www.w3schools.com/jquery/jquery_ref_selectors.asp ) you want instead of ".img-for-ondema-widget". The way to do so is to change "data-selector" attribute in the snippet script.

Example:

Default script:

Custom script:

That's it! If you need any further assistance, please contact support.

Still need help? Contact Us Contact Us