Enable google analytics for single page site with # views

后端 未结 1 694
我在风中等你
我在风中等你 2021-02-06 16:51

I\'ve read the similar questions, but my question is slightly different.

I am implementing a single page registration processing page for a site using Kendo UI. The sit

1条回答
  •  时光说笑
    2021-02-06 17:19

    Answer 1: Yes this will work perfectly fine: ga('send', 'pageview', '/register.html');

    You don't need the 3rd parameter if they are on the page where the code is being executed. It will automatically grab the current page where the code is being ran from if the 3rd parameter is undefined. But than this parameter allows you to set the page yourself, which could be useful if you need to send a pageview to a different page other than the page that the code is being executed on.

    change to this:

    
    

    And in each tabs click event, add the corresponding code to track which tabs are clicked:

    Tab 1 click event: ga('send', 'event', 'tab1', 'clicked');

    Tab 2 click event: ga('send', 'event', 'tab2', 'clicked');

    Tab 3 click event: ga('send', 'event', 'tab3', 'clicked');

    Tab 4 click event: ga('send', 'event', 'tab4', 'clicked');

    Source

    0 讨论(0)
提交回复
热议问题