How to add google tag manager in Xamarin forms app

Saurabh Yadav 0 Reputation points
2024-09-19T12:31:50.18+00:00

I want to integrate Google Tag Manager into our existing Xamarin.Forms app, which is developed using the .NET Standard 2.1 framework. This integration will enable us to manage and deploy marketing tags and tracking scripts more efficiently without needing to modify the app's code. Could you provide detailed steps on how to add Google Tag Manager to a Xamarin.Forms project, including any necessary configurations and code changes?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,346 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 42,361 Reputation points Microsoft Vendor
    2024-09-20T02:29:43.83+00:00

    Hello,

    Google Tag Manager is a native feature on Android. Therefore, you can refer to the official documentation provided by Google for configuration.

    This Library counterpart to Xamarin Nuget Package is Xamarin.GooglePlayServices.TagManager 118.1.0.2

    In addition, Xamarin support ended on May 1, 2024 for all Xamarin SDKs including Xamarin.Forms. For more information, please check: Xamarin official support policy | .NET (microsoft.com). We will recommend you upgrade Xamarin projects to . NET MAUI, please see the Upgrade from Xamarin to .NET & .NET MAUI documentation.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.