Set up Analytics tracking
30/11/2019
In this article:
Basic instructions
- If you have not already done so, create a property in Google Analytics. Create one Analytics property for each website you want to track. Creating a property generates a tracking ID, which you'll use in your gtag.js tracking code snippet.
- Find your tracking ID, as described below. You'll use this tracking ID in the tracking code snippet.
- Copy and paste the gtag.js tracking code snippet to each web page you want to track. Add the tracking code snippet right after the opening
Find your tracking ID
To find the tracking ID:
- Sign in to your Analytics account.
- Click Admin.
- Select an account from the menu in the ACCOUNT column.
- Select a property from the menu in the PROPERTY column.
- Under PROPERTY, click Tracking Info > Tracking Code. Your tracking ID is displayed at the top of the page.
Tracking code snippet
Paste the following snippet right after the tag on each page of your site. Replace
GA_TRACKING_ID
with your own Google Analytics tracking ID:
Verify that the tracking code is working
To verify that the tracking code is working, visit your website and check to see that your visit is being registered in the Real-Time reports.
Related resource
* Nguồn: Google Analytics