How do I add custom scripts or pixels to my registration and webinar presentation like Google Tag Manager?

The Scripts manager

The Scripts manager can be found as one of the items under your Profile menu on the top right. It allows you to manage all the scripts you use across your webinars in one location and easily apply them across your eWebinars.

A script can contain 1 of 3 types of tags:

  1. <img> tags.
    Many tracking pixels come in the form of an image that gets added to the <body> of a page and are typically the simplest form of tracking scripts.
  2. <meta> tags
    Meta tags are added to the <head> of a page. They are sometimes used by 3rd party platforms to get metadata.
  3. <script> tags
    Most scripts will be inside <script> tags.
ℹ️

<noscript> tags

Some scripts like Google Tag Manager (GTM) will include <script> and <noscript> parts of code. eWebinar does not need the <noscript> tags as eWebinar requires scripts run for registration and webinar playback.

You can ignore these.

Adding a script

To add a script follow the following steps:

  1. From the Scripts manager click Add new script.
  2. Name this script, for example: GTM script
  3. Copy/paste the script code from your service into this new script in the edit box that has a numbered line 1
  4. You can choose to not run this script and not track attendees if you have GDPR enabled and the attendee chose to not accept your cookies by turning on the switch named Disable script if visitor declines GDPR cookies
    See GDPR, privacy, cookies and scripts for details.
  5. Click Next
  6. Here you see all your webinars. You can choose on which pages to run this script. There are several places you can choose to run your scripts:
    Registration page

    The eWebinar registration page.

    NOTE: if you are using a custom registration page with an eWebinar widget, scripts will not run. The widget does not inject scripts onto your page. We expect your custom page already has appropriate scripts.

    Registration form Scripts run when the registration form pop-up opens. Note these scripts do not run on embedded registration forms.
    Thank you page

    These scripts run on the eWebinar thank you page after a successful registration.

    NOTE: if you are using a custom thank you page with or without an eWebinar widget, scripts will not run. We expect your custom page already has appropriate scripts.

    ADDITIONAL NOTE: In some cases the thank you page may be skipped if for example someone registers for an On Demand Just In Time session. In this case you should run any registration completion scripts here and in the Presentation room — or use the advanced script that runs when registration finishes so tracking fires on form submit before navigation.

    Webinar room Scripts will run when someone joins the webinar regardless of whether they are in the waiting room, presentation room (with the video) or the exit room after the video finishes.
    To summarize, you can run it on the Registration page, the Thank you page and the Presentation room (which encompasses both replay and scheduled sessions).
  7. Click Save & publish — your script will be live immediately
    NOTE: You may need to refresh the registration page a couple of times to see the newly published page with the script

Advanced: fire tracking when registration finishes

Page-load scripts alone are not always enough when you need to fire a pixel or push data to a tag manager the moment registration succeeds, especially if the thank you page is skipped (for example On Demand just-in-time) or you need registrant field values in the event.

You can add a script on the Registration page and/or Registration form that runs as soon as registration completes successfully:

<script>
window._ewc = window._ewc || [];
window._ewc.push({
  onRegistrationComplete: async function (registration) {
    // Example with Google Tag Manager dataLayer
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
      event: 'ewebinar_registration',
      email: registration.email,
      firstName: registration.firstName,
      lastName: registration.lastName,
      sessionType: registration.sessionType
    });

    // Example with Meta (Facebook) pixel — only if fbq is already loaded
    if (typeof fbq === 'function') {
      fbq('track', 'Lead', { content_name: 'eWebinar registration' });
    }
  }
});
</script>

You can paste this script before eWebinar finishes loading — use the same window._ewc = window._ewc || []; window._ewc.push(...) pattern. Commands queued earlier still run when ready.

The registration argument includes:

  • name, email, firstName, lastName (when collected)
  • sessionTime — the selected session start time
  • sessionType — Scheduled, JustInTime, Replay, orOnDemand
  • checkedConsent — when consent was collected on the form
  • Custom registration field values under their property names
⚠️

Requirements

  • Your handler must return a Promise (for example an async function). Any work that must finish before eWebinar navigates away should be awaited inside that Promise.
  • eWebinar waits up to 2 seconds for registration-complete tasks (built-in Meta CompleteRegistration tracking plus your callbacks) before continuing navigation.
  • If a callback throws, rejects, or does not return a Promise, that failure is logged and isolated; other callbacks still run.
  • On a custom host page with an eWebinar registration widget, put this script on your page (widget-managed Scripts manager entries do not inject onto custom pages).

For built-in Meta / Facebook pixel events (Visit Registration, CompleteRegistration, and fixing Visit Registration in Meta), see How do I track registrant visits… using the Meta (Facebook) pixel?.

Why am I asked for a privacy acknowledgement on the registration form?

As provided in our Terms and Conditions and Privacy Policy, eWebinar is a third-party solution made available for your use. You are solely responsible for obtaining any consent required to collect, store, process, use or disclose registrants’ personal information according to local laws and regulations. We take privacy and data protection laws very seriously and encourage you to find out what’s required in your area of business, including all local laws and regulation which apply to you, and which may apply to your registrants. For clarity, collection of certain information, such as social insurance numbers (SIN), social security numbers (SSN), and income level, may be outright prohibited in some areas of business and jurisdictions.

GDPR, privacy, cookies and scripts

Most scripts or pixels drop cookies onto an attendee's browser in order to track what they're doing. GDPR and other privacy standards require you ask attendees for consent before putting down a cookie on their browser.

Because of this, eWebinar offers a consent dialog box you can turn on to ask attendee's to opt-in to cookies. If they do not opt in then you shouldn't run any scripts or place any pixels via <img> tags that would track the user via cookies. For this reason each script has the option to not run if the attendee declined cookies named Disable script if visitor declines GDPR cookies