Preview and update GTM Container version | IOS

I have a built-in google tag manager in my iOS app. I am stuck at some points:

  • How to view the version before making it live.I followed this link and added the URLs in the plist file. How to take the next step mentioned in this link

    Stop the application and open the preview URL on the emulator or physical device to view the container container in your application.

  • He said that we do not need to introduce a new binary version, and the GTM version is automatically updated in the application. How? I did not write code to update the container.

Thanks,

+2
source share
1 answer

I just tried using the container preview as you asked me;) It seems that it worked for me, so I will try to explain the step for you to make it work.

  • The step you seem to be stuck at is pretty easy, and I achieved this on a simulator:

    • Launch the application on the simulator by clicking the play button in the upper left corner of Xcode: xcode example

      Press the play button (1) as soon as you set the simulator as the build target (2).

    • Wait for the simulator to launch your application. Once this is done, press the following keys once to return to the iphone homepage:

      Cmd + shift + h

      Double-clicking on it will allow you to kill the application in the background by placing your application from the bottom up with the mouse.

    • Open the safari on the emulator and paste the URL that you copied in the Share preview pop-up window: <img src = "https://i.stack.imgur.com/xgYEm.png" alt = "link to preview the GTM popup link ">

      If everything is configured correctly, it will ask you if you want to open it in your application, just click yes , and you're done!

  • For your second question, if I understand well, the only fact that you create a version without publishing it allows you to view it using the link you created. The GTM SDK was designed to work this way, the link you use will probably force you to update the container yourself to the latest version, even if it is not implanted.

If I remember well, GTM now uses Firebase as a DataLayer and automatically dispatches some events, such as applicationStart, that can trigger a container update method. I'm not 100% sure, as I'm more used to the previous version of GTM, and now I'm no longer working on a GTM project.

In any case, I hope this helps you. Good luck with GTM :)

+3
source

Source: https://habr.com/ru/post/1263207/


All Articles