Googletagmanager with Turbolinks

前端 未结 4 973
攒了一身酷
攒了一身酷 2020-12-19 08:04

Can someone explain how should we properly integrate Googletagmanager with Turbolinks?

On normal pages we just copy/paste this code immediatelly after after the open

4条回答
  •  执笔经年
    2020-12-19 08:46

    The two existing answers are incomplete. Here is the full solution, along with information on how to configure GTM for your change:

    Add this to your site:

     
    

    Once you've done that, register the trigger in Google Tag Manager and associate that trigger with the desired tags.

    The complete instructions are available here: http://labs.wrprojects.com/how-to-use-google-tag-manager-with-rails-and-turbolinks/

提交回复
热议问题