Skip to content

Instantly share code, notes, and snippets.

@multiplehats
Last active September 22, 2020 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save multiplehats/98f47a14d514ac69b51c572099565e14 to your computer and use it in GitHub Desktop.
Save multiplehats/98f47a14d514ac69b51c572099565e14 to your computer and use it in GitHub Desktop.
Deadline Funnel x EverWebinar
<script>
/**
* Everwebinar x Deadline Funnel
* Checks for the Everwebinar Product Offers Popup (Settings >> Live >> Product Offers) and adds the email from the attendee to the URL.
* If no email is present it will default to the sales link set in the Product Offers setting.
* Ideally the link you set in the Product Offers setting is the DLF link without the ?em= query string in the URL.
* As confirmed by the DLF team, this will create a new tracking for that user. However, if that user clicks on an email later on, those 2 trackings will be merged into one.
*
* Author: Chris Jayden - chrisjayden.com
**/
jQuery(document).ready(function($){
var attendeeProperties = window.localConfiguration,
everwebinarSalesPopupBtn = ".attendee_slide_up_block .tab-content a",
deadlineSalesPageLink = "https://dfl0.us/s/12345678?em="; // Change to your sales page DLF link
if (typeof attendeeProperties != "undefined") {
var deadlineEmail = attendeeProperties.me.email;
if ( deadlineEmail ) {
var deadlineLink = deadlineSalesPageLink + deadlineEmail;
var everwebinarSalesPopup = setInterval(function() {
if ( $( everwebinarSalesPopupBtn ).length ) {
var btn = $(this);
clearInterval( everwebinarSalesPopup );
$( everwebinarSalesPopupBtn ).prop("href", deadlineLink);
console.log("Found attendee's email, set Deadline Link: " + deadlineLink);
}
}, 500 );
}
}
});
</script>
@multiplehats
Copy link
Author

multiplehats commented Sep 22, 2020

The sales popup in Everwebinar is added dynamically (as in, it doesn't exist yet in the browser). This script will check every 500ms if the sales popup exists. And if it does, it will get the attendee's email address, and adds it to the Deadline Funnel link. if no email is present for whatever reason (unlikely) it will default to the link set in your Everwebinar settings.

  1. Use it at your own risk. This uses the user object present in Everwebinar's code and this could change at any time (although, I think this has been around for some time + you have a backup link in Product Offers settings - so you should be good).
  2. This takes into account that you only have 1 product offer set. And not multiple.

To be added in Integrations >> 3rd Party Tracking Systems >> Webinar live room tracking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment