GEN Edge Google Analytics tracking
Group rate link
Evolytics' tracking request:
javascript code:
var plans_group_rate_btn = document.querySelectorAll('.gen-edge-ga-banner-group-rate a');
if(plans_group_rate_btn) {
plans_group_rate_btn.forEach(function (elem) {
elem.addEventListener('click', function(e) {
dataLayer.push({
'event': 'gen_ev_group_rate_compare',
'eventCat': 'gen edge',
'eventAct': 'interested in group rate',
'eventLbl': 'body link',
'eventVal': 0,
'nonInteraction': 0
});
});
});
}
Large Group Form Submit
Form is located here: https://www.genengnews.com/gen-edge-group-memberships/
Evolytics' tracking request:
javascript:
if(document.querySelector('#form_genedgegroupsubscriptionform')) {
document.querySelector('#form_genedgegroupsubscriptionform').addEventListener('submit',function (e) {
dataLayer.push({
'event': 'gen_ev_large_group_button',
'eventCat': 'gen edge',
'eventAct': 'form submission',
'eventLbl': 'group',
'eventVal': 0,
'nonInteraction': 0
});
});
}
Membership Comparison Page
This is a new page added to the site in 2021: https://www.genengnews.com/gen-edge-membership-comparison/
Evolytics' tracking request:
Javascript:
document.querySelector('.plan-select a').addEventListener('click',function (e) {
dataLayer.push({
'event': 'gen_ev_get_started_footer',
'eventCat': 'gen edge',
'eventAct': 'get started',
'eventLbl': 'comparison',
'eventVal': 0,
'nonInteraction': 0,
'membershipLevel': '<<gen edge>>/<<gen basic>>'
});
});
GEN Edge Registration Form
It's located here: https://www.genengnews.com/create-your-gen-account/?level=2
Evolytics' tracking request:
Javascript to do this tracking:
if(document.querySelector('#rcp_registration_form')) {
document.querySelector('#rcp_registration_form').addEventListener('submit',function (e) {
dataLayer.push({
'event': 'gen_ev_register_form_submit',
'eventCat': 'gen edge',
'eventAct': 'form submission',
'eventLbl': 'register',
'eventVal': 0,
'nonInteraction': 0,
'membershipLevel': '<<gen edge>>/<<gen basic>>'
});
});
}
GEN Edge In the Navigation Menu
located at the top of the page site-wide
Evolytics' tracking request
Javascript:
jQuery("a.sf-with-ul:contains('GEN Edge')").on('click', ()=>{
dataLayer.push({
'event': 'gen_ev_navigation',
'eventCat': 'navigation',
'eventAct': 'main menu',
'eventLbl': 'gen edge',
'eventVal': 0,
'nonInteraction': 0
});
});
var toPush = jQuery("a.sf-with-ul:contains('GEN Edge')").next('.sub-menu').find('li > a').toArray();
toPush.forEach(item=> {
jQuery(item).on('click', ()=> {
dataLayer.push({
'event': 'gen_ev_navigation',
'eventCat': 'navigation',
'eventAct': 'main menu',
'eventLbl': 'gen edge | ' + jQuery(item).text(),
'eventVal': 0,
'nonInteraction': 0
});
});
});
GEN Edge FAQ Page
Located here: https://www.genengnews.com/gen-edge-faqs/
Evolytics' tracking request:
Javascript:
document.querySelector('.gb-accordion-title').addEventListener('click',function (e) {
dataLayer.push({
'event': 'gen_ev_faq',
'eventCat': 'gen edge',
'eventAct': 'faq',
'eventLbl': document.querySelector('.gb-accordion-title').innerText,
'eventVal': 0,
'nonInteraction': 0
});
});
Content Gate
Located on any article with the GEN Edge category for anyone who is not logged in to GEN with an account with a GEN Edge membership
Evolytics' tracking request:
Javascript:
if(jQuery("li.entry-category a:contains('GEN Edge')").length === 1) {
document.querySelector('.RCP-Content-Gate-reg-btn').addEventListener('click', ()=>{
gen_edge_ga_track_content_gate('Join GEN Edge test');
});
document.querySelector('.RCP-Content-Gate-start-btn').addEventListener('click',()=>{
gen_edge_ga_track_content_gate('Start Your 30-Day Free Trial Now');
});
document.querySelector('.RCP-Content-Gate-login').addEventListener('click',()=>{
gen_edge_ga_track_content_gate('Login');
});
document.querySelector('.RCP-Content-Gate-logo').addEventListener('click',()=>{
gen_edge_ga_track_content_gate('Logo');
});
}
function gen_edge_ga_track_content_gate(eventLbl) {
dataLayer.push({
event: 'gen_ev_start_free_trial',
eventCat: 'gen edge',
eventAct: 'content gate',
eventLbl: eventLbl,
eventVal: 0,
nonInteration: 0
});
}
Pre-Existing Tracking for GEN Edge
This section has all the GA tracking for GEN Edge that wasn't modified in June/July 2021 that I know about.
Get started page
Evolytics' tracking request:
Javascript: can't find it on the document,
Javascript: (Might push for both buttons. Can't tell from what's in the php doc)
// Banner Pricing - GET STARTED button
if(document.querySelector('.gen-edge-ga-banner-action-btn'))
document.querySelector('.gen-edge-ga-banner-action-btn').addEventListener('click', function(e){
_do_alert('gen edge | get started | ' + 'header banner');
dataLayer.push({
'event': 'gen_ev_get_started_header',
'eventCat': 'gen edge',
'eventAct': 'get started',
'eventLbl': 'header banner',
'eventVal': 0,
'nonInteraction': 0
});
});