In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the knowledge of "how to send events to Google Analytics quickly". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
You only need to complete the following two steps to view the data on Google Analytics:
1. Modify the DTM configuration to send an event named "$AddProduct2Cart" to Google Analytics
two。 Create a version and publish it
First of all, your App needs to be integrated with DTM SDK, and use Huawei Analytical SDK to complete the burial point of "joining the shopping cart event".
Bundle bundle = new Bundle (); bundle.putString (PRODUCTID, "xxx"); bundle.putString (PRODUCTNAME, "xxx"); HiAnalytics.getInstance (context) .onEvent (HAEventType.ADDPRODUCT2CART, bundle)
Next, you need to:
1. Modify DTM configuration
1.1 configuration variables
Click "configure" in the variable management, select Event Name, and click "OK" to add successfully.
1.2 configuration conditions
Click "New" in the condition management, select "Custom" for the condition type, select "partial event" for the trigger condition for this condition, select "Event Name" for the variable, select "equal" for the operator, and set the value to "$AddProduct2Cart".
1.3 configuration Code
After the variables and conditions are configured, create a new Google Analytics code in code management. The configuration is as follows:
Code name: customizable
Extension: select Google Analytics (Analysis): Universal Analytics
Tracking ID: enter the unique tracking ID of Google Analytics in the format of UA-XXXXXXXX-X
Escalation type: select event escalation
Event category: Click
Event action: Add2Cart
Trigger condition Select the condition you just added.
two。 Create a version and publish it
After all the configuration is complete, you need to create and release the version in version management. App with integrated DTM SDK periodically downloads the latest version and escalates events based on the configuration of the latest version.
Create a new version in version management and select the create and publish this version option.
The version will be released automatically after it is successfully created.
After completing the above two steps, you can view the data you need on Google Analytics:
By default, the interval between downloading the latest version of DTM SDK is 6 hours. If you want to download the latest version immediately, you can first clear the application's cache and restart the application. And when debug mode is not turned on, DTM does not immediately report events. Instead, events are reported every 10 minutes while the application is running. If you need to report the event immediately, you can run the adb naming:
Adb shell setprop debug.huawei.hms.dtm.app
When you view the data on the Google Analytics platform, the "add to the cart" event is triggered in App, and the data may be delayed by a few minutes.
As shown in the figure above, in "Real time"-> "events" in the navigation bar, view the recently reported data. You can see that among the reported events, the event category is "Click" and the event action is "Add2Cart", which is consistent with the configuration in DTM, indicating that the configuration in DTM can take effect.
That's all for the "method steps for sending events to Google Analytics quickly". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.