Skip to main content

WP Meta SEO: Google Analytics Integration

1. Google Analytics tracking

You can active the tracking for 4 methods: Universal, Classic Analytics (legacy) or using the Analytics v4 or Tag manager. Please go to WP Meta SEO > Google Analytics > Google Analytics Tracking tab.

 

google-analytic-menu

 

After selecting the option, you should fill the respective ID in the field below. 

Universal, Classic Analytics (legacy)

 

classic-universal-tracking

 

Analytics v4 Property 

 

analytic-4-property-tracking

 

Tag manager 

 

tag-manager-tracking

 

Use tracking JS code

You can add directly your tracking JS code for Google Analytics or Tag manager in those fields.

 

tracking-js-code

 

2. Google Analytics data

WP Meta SEO is fully integrated with Google Analytics. You can activate the tracking and display the Google Analytics data from the WordPress admin. 

How to create a Google Analytics 4 property?

First, you should go to https://analytics.google.com/, navigate to Settings Admin on the left corner.

 

admin-settings-ga

 

Click on Create Account and Create property button and follow the next steps to create a new account and a new property.

 

create-property-ga

 

Then go to Property > Data Streams tab, click on Add stream > Web. After that, input your website URL and stream name on the fields.

 

add-new-stream-ga

 

How to get the credentials?

In order to use the Google Analytics Report, you have to get Client ID and Secret. Go to https://console.cloud.google.com/apis/dashboard and create a new project.

 

create-project

 

Then setup a project name - you can provide any name you want, but do not include spaces or accents.

 

project-name

 

Then wait few seconds for the project creation.

 

creating-project

 

From the left navigation menu, click on “APIs & Services >> Credentials”

 

api-dashboard

 

If asked, add a name to your OAuth consent screen. Remember to choose your correct option in "Publishing status":

  • In production: Once you set your app status as "In production," your app will be available to anyone with a Google Account. Depending on how you configure your OAuth screen, you may have to submit your app for verification.
  • Testing: If your app is still being tested and built, you can set your status to "testing". In this state, you can test your app with a limited number of users. 

 

publish-status

 

Next, scroll down and click on Add Users button, input your user's Gmail address to the field.

 

add-users

 

Then at Credentials tab, click on “+ Create Credentials” >> OAuth client ID.

 

create-oauth-client

 

Choose Web application and name for your OAuth client ID.

 

create-oauth-name

 

Go to WP Meta SEO > Google Analytics > Google Analytics Data tab, copy JavaScript origins and Redirect URIs fields then paste to the corresponding fields.

  • JavaScript origins: https://yourdomain.com/
  • Redirect URIs: https://yourdomain.com/wp-admin/admin.php?page=metaseo_google_analytics&view=wpms_gg_service_data&task=wpms_ga
     

 

fill-redirect-url

 

Click on Create button and a pop-up window including Client ID and Client Secret will appear. Keep these for the next step.

 

client-id-secret

 

If you have not enabled Google Analytics APIGoogle Analytics Admin API, Google Analytics Data API, please go to APIs & Services > Library, search and enable them.

 

google-analytics-api

 

How to connect your Google account on WP Meta SEO?

Now, back to WP Meta SEO > Google Analytics > Google Analytics Data tab, you can paste Client ID and Client Secret in the fields. Remember to click on Save and Connect button.

 

fill-client-id

 

After that, follow the next steps to connect your Google account.

 

authen-google-account

 

Finally, you need to select the Google Analytics property corresponding to your domain. Remember to click Save button after selecting.

 

select-profile

 

Congratulations! Google Analytics is now connected and you can get data from it.

 

google-analytic-report

 

There will be 2 main types: Analytics v4 or Universal, Classic Analytics (legacy) so the Basic tracking section will be different.

Universal, Classic Analytics (legacy):

 

tracking-settings

 

 Analytics v4:

 

tracking-setting-ga4

 

WP Meta SEO offers some additional tracking settings:

  • Tracking Settings
  • Basic Tracking
  • Events Tracking
  • Exclude Tracking

 

google-analytic-data

 

The basic tracking options

 

basic-tracking

 

Tracking type: Classic Analytics and Universal Analytics.
Anonymize IPs while tracking: allow you to comply with some privacy protection laws available in different countries.
Enable demographics and interests reports: display remarketing, demographics and interests reports with Google Analytics. 

Events Tracking

This feature allows you to track downloads, mails, affiliates and outbound links. Depending on your needs, you can choose to include or exclude these actions from the bounce-rate calculations.
To track downloads, the plugin uses an extension list to properly distinguish files from regular links. You can use the Downloads Regex (a JavaScript regular expression) to add extra file extensions.

 

event-tracking

 

Exclude Tracking

This option is used to ignore traffic generated by certain logged-in users.

 

exclude-tracking