Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Advanced homepage analytics
// Add this below the analytics tracking:
if ( sectionName === 'pricing' ) {
setCookie( 'viewed_homepage_pricing', 'true' );
// Then in your sign up event:
analytics.record( 'Signed Up', {
viewed_pricing: getCookie( 'viewed_homepage_pricing' ) === 'true'
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment