简体   繁体   中英

Will Google Tag Manager work on devices without GMS?

will Google Tag Manager work on devices without Google Mobile Service or Firebase Analytics?

For example: Huawei is on a phone that does not have Google services and only Huawei services are running.

As far as I know, Google Tag Manager is dependent on the Google Play service, meaning it won't work on devices without Google Mobile Service or Firebase Analytics.

Huawei also provides the Dynamic Tag Manager service , which helps you dynamically and flexibly manage the tracking code of applications on your mobile phone, tablet, or web platform, and monitor marketing and operation activity data on demand. You can access this service on your Huawei phone.

For details,check docs . I hope it could help.

Huawei phone without Google Mobile Service will not be able to use Google Tag Manager, However, we can use very similar coding to achieve the same functionality with Huawei Dynamic Tags.

We can build apk with slightly different code and library, for example:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    // Obtain the HiAnalyticsInstance instance.
    HiAnalyticsInstance instance = HiAnalytics.getInstance(this);
}

And adding tags with:

// Customize an event to report.
// Set the custom event name to Purchase.
String eventName = "Purchase";
// Customize event parameters.
Bundle bundle = new Bundle();
// Set a value of the Double type.
bundle.putDouble("price", 9.99);
// Set a value of the Long type.
bundle.putLong("quantity", 100L);
// Set a value of the String type.
bundle.putString("currency", "CNY");


// Report events.
if (instance != null) {
instance.onEvent(eventName, bundle);
}

As we can notice that this is very similar to app coding. And fully support analytic tracking audience.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM