Onpage Hero extends Google Analytics functionality with unique custom dimensions. This time, we are focussing on automatically detecting the hreflang tag of each page using the Hreflang Onpage Hero custom dimension.
Firstly, make sure you have the Hreflang dimension selected as part of your Onpage Hero plan. Free plans allow you to add up to 3 datapoints, whereas paid plans allow up to 20.
Upgrade today to access up to 20 datapoints
To check which datapoints you have access to, log in to your Onpage Hero account and click the little settings icon on the right. Now, select Change Datapoints to display your current setup.
The options on the left show the datapoints applied to this property. Select the Hreflang dimension, click NEXT, then VIEW ANALYTICS to jump into your Google Analytics property.
What is a hreflang meta tag?
The hreflang tag is a HTML element that specifies the language and regional version of a page. For example, if a website has three different versions, one in US English, one in UK English and one in French we can use the hreflang tags “en-us”, “en-gb”, “fr-fr” to specify the language followed by the region.
Why are hreflang tags important?
Hreflang tags help search engines make sense of websites with multiple versions. They help create a better user experience by enabling search engines to serve the correct regional variant of your content to local users. In addition, hreflang tags help duplicate content issues when two regional variants exist. These variants may be extremely similar, but setting hreflang tells Google what you are trying to do.
Hreflang tags best practices
- Use hreflang to specify the language and regional variants of site
- Use in combination with rel=”canonical” tags
Detecting hreflang tags with Onpage Hero
To find the Hreflangs custom dimension in Onpage Hero, simply navigate to your default view within in your Google Analytics property.
Firstly, enter your Google Analytics property and navigate to:
Behaviour > Events > Top Events
Then, set Event Label as the primary dimension. This is your standard view for using Onpage Hero custom dimensions.
Not seeing any Onpage Hero data? Check that you have set up Onpage Hero correctly following this guide.
Ok, let’s take a look at our language settings. Type “hreflang” as a secondary dimension to display the results.
The results show the language following by the region. If you see any “not available” in your results, check that you have set a hreflang tag on that page.
Onpage Hero custom dashboards: Meta Tags
Hreflang tags are just one of the meta tags that Onpage Hero allows you to see in Google Analytics. Others include the robots meta tag and canonical URLs. To see these three meta tags all together head over to our dashboards page and grab the Meta Tags custom report for Google Data Studio. Simply select the property for which you wish to see the data for from the drop-down menu.
Key Takeaways: hreflang tags
- Set hreflang tags for language and regional variants
- Use hreflang in Onpage Hero to monitor these tags
Further reading
Time to optimize these other meta tags:
- Robots – make sure your data is being crawled correctly
- Canonical URLs – set the preferred version of each page for optimal indexing
Any issues or feedback? Let us know about your issues and product feedback via support@onpage-hero.com and we’ll be happy to help you.