Android Google Tag Manager

后端 未结 1 1218
礼貌的吻别
礼貌的吻别 2021-01-25 06:20

I am implementing Google Tag Manager for Android Application V4 as requested by my Marketing team for future use,and I have never worked on GTM for websites so I am naive in thi

相关标签:
1条回答
  • 2021-01-25 06:57

    enter image description hereIf you are following those steps carefully then this warning doesn't stop you from opening container or sending data to analytics. I am also following instructions available here. I'm getting these logs

      W/GoogleTagManager(3101): Failed to extract the container from the resource file. Resource is a UTF-8 encoded string but doesn't contain a JSON container
      V/GoogleTagManager(3101): The container was successfully loaded from the resource (using binary file)
    

    Follow this link to create Macros and Tags. http://online-behavior.com/analytics/mobile-apps-tag-manager

    Look carefully if you have created firing rules for you tags. Also verify if you have published your Container. Try opening your container in onCreate() method.

    In GTM V4 after opening container in onCreate(), preferred way is that you need to push your event like this in your onStart() method.

     DataLayer mDataLayer = TagManager.getInstance(this).getDataLayer();
     mDataLayer.pushEvent("your event name here", DataLayer.mapOf("screenName",SCREEN_NAME));
    

    Update: I have attached image to show how I'm changing Basic Configuration. Hope this helps.

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