Advertisement
dusanmiha

GA - menu_click - bmbn

Aug 16th, 2022
576
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Fire this dataLayer event when a user clicks on a menu link. There are four types of menus: top menu, sub-menu, header menu and footer menu
  2.  
  3. <script>
  4. window.dataLayer = window.dataLayer || [];
  5. window.dataLayer.push({
  6.  'event': 'menu_click',
  7.  'menu_type': 'sub-menu',  // top menu, sub-menu, footer menu, header menu
  8.  'menu_link_name': 'threads',  // home, store, threads, etc.
  9.  'sub_menu_category': 'creative',  // agency, creative, data, etc. - include this parameter only for sub-menu clicks
  10.  'click_text': 'see all articles'  // creative (or any other category), articles, see all articles, or article title - include this parameter only for sub-menu clicks
  11.  });
  12. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement