Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Released] Google Tag Manager

Discussion in 'Assets and Asset Store' started by stanislav-osipov, Nov 18, 2014.

  1. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Google Tag Manager allows you to quickly and easily update the configuration and flag values of mobile apps that you have created. Instead of rebuilding and deploying new binaries, you can use the Google Tag Manager interface to change configuration values (for example, timeout, ad position, game play dynamics) and turn on flag-enabled features in your mobile apps.
    Read more about Google Tag Manager


    Asset Store | Documentation

    Avaliable on Platforms
    * IOS
    * Android

    How It Works
    A container in Google Tag Manager holds the macros and rules which govern how the configuration and flag values in your app are set. You manage the container - editing its macros and rules, previewing, testing, and publishing new versions of the container - from your Google Tag Manager account.
    Video Introduction to Google Tag Manager


    How to get support
     
  2. mrish7

    mrish7

    Joined:
    Dec 12, 2014
    Posts:
    1
    Hi,
    Does Google Tag Manager work without issues for games coded in Unity as well?
    Thanks,
    M Sharma
     
  3. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Well, sure since it's Unity plugin. You can use it for your Unity game.
     
  4. mobile-games

    mobile-games

    Joined:
    May 31, 2014
    Posts:
    1
    Hi
    Are you going to support windows phone/metro ?
     
  5. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    As far as I know google tag manager is available for IOS / Android. If Google will release SDK for windows phone/metro I will try to add it to the plugin.
     
  6. cms

    cms

    Joined:
    Sep 19, 2011
    Posts:
    43
    Hello Stan,

    We are totally new with the Google Tag Manager and our client is urgently asking to integrate the Google Tag Manager for tracking so we thought that buying your plugin was the best idea. So we bought it a couple of minutes ago.

    Following your instructions, we:

    1. Install the plugin
    2. Add the container id that our client sent us.

    But now what ? How will he make the tracking ? Is there anything else to ask him ? How can we check that is tracking something ? or what point the tracking happens ? Is there sort of a "ping" sent to the google server ?

    Thanks in advance
     
  7. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Well, if you will describe what excatly your client need, I will try to help. But actually mobile version of Google Tag Manager is mostly used like external and very easy changeable Config for your app.


    For example you can changes settings of your app online. Without re-uploading it to the google play / appstore. Or you can change app setting for specific user group or region.
     
  8. JudeTudor

    JudeTudor

    Joined:
    Mar 6, 2014
    Posts:
    6
    Hello, there. I've installed your plugin and encountered 2 problems. I'm not sure if they're related or not. First of all, after I install the plugin from the editor (via the blue "Install Plugin" button) I will have similar java classes in 2 'Plugins" folders. First of all there is the "Assets/Plugins/Android" folder and the "Assets/Plugins/StansAssets/TagManager/Android" both of which contain the exact same classes. If i want to be able to build on an Android phone, I have to get rid of some of these duplicate files (tagmanagerplugin.jar and libGoogleAnalyticsServices.jar to be more exact). If I delete "Assets/Plugins/StansAssets/TagManager/Android" then the plugin prompts me to update it. If I delete "Assets/Plugins/Android" I get that the Plugin needs to be installed. If i just delete the duplicate .jars but leave the folders from one of these folders I no longer have problems. Second, when i try to get data from container while app is on my phone, it doesn't work. If i look in logcat, i get a nullreference exception when calling Tagmanager.instance.GetDouble. I don't know what to do.
     
  9. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello, I got it. I am assuming you are using Unity5.
    Please send same request to the support team at stans.assets@gmail.com we will fix this issue and provide you with the update ASAP.

    Thanks.
     
  10. WhatWapp

    WhatWapp

    Joined:
    Jan 26, 2014
    Posts:
    5
    Hello,
    we are about to purchase this plugin and we just want to ask you a couple of questions:

    1) Does it use the the latest Google Tag Manager library (V4 for Android and V3 for iOS)?
    2) Is it fully compatible with Google Tag Manager or some functions are limited (ex: something that doesn't work on Android/iOS)?
    3) Is it fully compatible with Unity 5?
    4) Does it compile for Android X86 and iOS IL2CPP?

    Thanks!
     
  11. JudeTudor

    JudeTudor

    Joined:
    Mar 6, 2014
    Posts:
    6
    Hello,
    is there any chance you can integrate a callback function that is called when the container is retrieved? Currently, it seems you have to place the call in the update function and then it eventually works.
     
  12. JudeTudor

    JudeTudor

    Joined:
    Mar 6, 2014
    Posts:
    6
    I think you need to include the following .h files in the package:
    FunctionCallMacroHandler.h
    FunctionCallTagHandler.h

    I get an error when i try to build the project in XCode.
     
  13. Victor_Kallai

    Victor_Kallai

    Joined:
    Mar 5, 2014
    Posts:
    123
    Hello @lacost,

    I'm using Google Tag Manager and Ultimate Mobile plugin and they are in conflict because both are using Google Analytics classes which are included in both plugins (libGoogleAnalyticsServices.jar in Tag Manager and google-play-services,jar in Ultimate Mobile)

    The error I'm getting is:
    CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
    C:\Program Files\Java\jdk1.8.0_11\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/adt-bundle-windows-x86_64-20140702/sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -

    stderr[

    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/internal/Command;
    at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
    at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
    at com.android.dx.command.dexer.Main.processClass(Main.java:732)


    Please give me a quick fix for this problem, I do not have the experience to complite the eclipse project myself without the com/google/android/gms/analytics/internal/Command class.

    Also if you could provide me a way to add a callback in Tag Manager for when the container is ready to access.

    Best regards,
    Victor
     
  14. Cheshire Cat

    Cheshire Cat

    Joined:
    Sep 18, 2012
    Posts:
    39
    The thread seems to be kind of abandoned, but I'll try anyway

    Is Google Tag manager good for managing In-App goodies prices online? I mean if I want to update app goodies prices, make sales, etc - is that a good idea to use Google Tag Manager for this?

    Thanks,
    Ilya
     
  15. JudeTudor

    JudeTudor

    Joined:
    Mar 6, 2014
    Posts:
    6
    @Chesire Cat - yep it's a great tool and I use it to control my entire app remotely but sadly It still has some issues. It's missing a callback and it comes into conflict with other Stan's Assets plugins. I've made a workaround and managed to make it work eventually. If you need it now i'll share my solution or just wait for the plugin to get a proper fix from Stan.
     
  16. Cheshire Cat

    Cheshire Cat

    Joined:
    Sep 18, 2012
    Posts:
    39
    Hey JudeTudor
    It seems that the plugin is not under a massive development right now, so if you'd share you solution it would be very helpful.
    Besides that, what kind of conflicts did you have - some .jars which duplicate each other? I so, could you please share how you managed to resolve that also?

    Thanks,
    Ilya
     
    Last edited: Jun 28, 2015
  17. JudeTudor

    JudeTudor

    Joined:
    Mar 6, 2014
    Posts:
    6
    Ok so this particular solution is very hacky and i so far only tested it on Android. The issues I have are the following:
    1. When you put the package in your project it contains 2 jars and some .m files that will cause you some distress. When you install the plugin from the editor(after you put the plugin in the project you also have to install it) it will duplicate those jar files and .m files and place them in your plugins folder under Android and iOS folders respectively. Problem is that it duplicates them. You can just go to the initial .jars (in Stan's Assets/ Tag Manager), click on them and uncheck Android checkbox (this way the jars won't be part of the build). You can also delete them but you'll get an annoying warning every minute or so that the plugin needs and update in your editor.
    2. The .jar file "libAnalyticsServices.jar" will come into conflict with google-play-services.jar which is in almost all of stan's plugins. I made my own .jar which replaces libAnalyticsServices.jar and resolves the conflict. Here's a link to it: http://we.tl/ygUMmazfRW . This .jar will replace libGoogleAnalytics.jar and all will work fine (again: on Android)
    3. The way this plugin works is that it will download a container containing data off the google servers which contains various variables from which you will extract the data that you need. However : there is no callback function to let you know that the container has downloaded. Instead you just place it into the update function and hope for the best. The way i got around this is like so : I get one of my variables which i am sure will never be 0. I get the data from the server into that variable. If that variable is 0 then it means that the data hasn't arrived from the servers yet. I do this in the update function untill that variable is something other than 0. This particular check is needed for the following scenario. If the user of your app enters the your app the very first time and fails to connect to the google tag manager server for whatever reason (i.e. enters the app his very firtst time with the internet shut off) he will have 0 on all those variables. So if this happens i initialize all those variables that i would get from the server with an init value.

    This works for me even though it is unbelievably hacky. I've mailed Stan on several occasions but haven't heard back from him in some time. It seems like they don't care much for this plugin which is a shame. I'm almost considering writing my own.
     
    spixy16 likes this.
  18. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello, sorry for slow answer here. I having difficulties with the developer who have worked on plugin earlier. So I can't get a source code to make simple changes you guys requesting.
    If I will not get at least the sources for one more week I will end up rewriting whole plugin myself,

    Sorry for inconvenience, and feel free to ask for refund if that is deal breaker for you.
    Cheers!
     
  19. DziDAI

    DziDAI

    Joined:
    Dec 6, 2012
    Posts:
    68
  20. Seal_I

    Seal_I

    Joined:
    Apr 19, 2013
    Posts:
    7
  21. spixy16

    spixy16

    Joined:
    Oct 5, 2015
    Posts:
    1
    Hi, can you reupload your solution?
    Thanks
     
  22. mtartist

    mtartist

    Joined:
    Jan 10, 2014
    Posts:
    17
    Does this thing still work?

    We really need an updated version of this.
     
  23. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Last version of Google Tag Manager was released May 03, 2015.
    This plugin is updating quite rarely in comparison to our other core plugins.
    Most likely major update with some new reatures will be released in future.

    If you have any questions or need any kind of assistance with Google Tag Manager, please, contact Stan's Assets Support Team via support@stansassets.com

    Cheers!
     
  24. rendered_monkey

    rendered_monkey

    Joined:
    Nov 5, 2014
    Posts:
    4
    I get the following error in xcode.

    Libraries/Plugins/StansAssets/TagManager/iOS/TagManagerBridge.mm
    Libraries/Plugins/StansAssets/TagManager/iOS/TagManagerBridge.mm:12:9: 'FunctionCallMacroHandler.h' file not found

    Anyone else seeing this?
     
  25. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    You better contact The Stan's Assets Support Team directly via support@stansassets.com
    You will get great assistance in a short time.

    Cheers!
     
  26. AM-Dev

    AM-Dev

    Joined:
    Aug 5, 2015
    Posts:
    31
    Hi there,

    I bought the plugin and now I'm trying to do custom events for Google Analytics. I tried to follow the steps in the Android version here: https://developers.google.com/tag-manager/android/v4/ua#create-ua-screen-view-tag

    But I'm unable to do the 4. step "Push open screen event and screen name to data layer". Can someone help me? Is it even possible to use the data layer and push something to (e.g.) Google Analytics?

    Also the question with the default container is important for us. Where would the default container be placed in a unity project?

    I asked the support for help, but it's seems they don't have time or care about support.
    Thanks

    EDIT: Plugin developer replied again and said they'll help me in the next week. Cheers.
     
    Last edited: May 27, 2016
  27. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    For now, there are no Push APIs in Google Tag Manager framework.
    That's the functionality for future updates of this plugin.
    I can not say exactly when these features will be implemented, but we have the plans for it.
    Please, keep looking forward to future updates.

    If you will have any additional questions according to Google Tag Manager, please, feel free to contact Stan's Assets Support Team via support@stansasstes.com

    Best regards,
    Alex
     
  28. chriszul

    chriszul

    Joined:
    Feb 13, 2018
    Posts:
    33
    Hi @AlexRay I am having this same problem with your google tag manager asset -
    Is there a way to get around this issue? I've emailed you about this.
     
  29. vOwl

    vOwl

    Joined:
    Jul 6, 2013
    Posts:
    8
    The Plugin is not longer available on the Assetstore :(

    Has anyone a working solution for Unity + Google Tag Manager on Android + iOS?
     
  30. remiC3D

    remiC3D

    Joined:
    Dec 15, 2017
    Posts:
    30
  31. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Wasn't a very popular solution, that's why it was removed from the store.
     
  32. atrottz

    atrottz

    Joined:
    Jul 25, 2018
    Posts:
    2
    What's a better way to do this? I don't see much info about GTM and Unity. Any insights would be appreciated on best ways to do this.
     
  33. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    I pretty sure google firebase plugin can be an alternative now.
     
  34. chriszul

    chriszul

    Joined:
    Feb 13, 2018
    Posts:
    33
    I worked around by using google's tag manager and putting the containers into the project myself, along with both of the android and iOS GTM plugins. It seems to work. I also use google firebase but we wanted to also leverage tag manager.
     
    Mikely9 and kinglinus like this.
  35. kinglinus

    kinglinus

    Joined:
    Dec 9, 2019
    Posts:
    3
    How did you add the containers?
    I try it by myself at the moment and don't know where to put the container files.
     
    Mikely9 likes this.
  36. Mikely9

    Mikely9

    Joined:
    Jan 30, 2018
    Posts:
    4
    I know it's been a while but would you mind telling me more about your implementation/possible give a mini tutorial? I would also like to know how to implement GTM for Android and iOS in Unity
     
  37. Mikely9

    Mikely9

    Joined:
    Jan 30, 2018
    Posts:
    4
    Did you manage to implement it?
     
  38. lamdevmobile

    lamdevmobile

    Joined:
    Jun 7, 2023
    Posts:
    1
    Bạn có thể chỉ cho tôi làm thế nào để làm điều đó?