Scrape Analytics ID

#1

I would like to display the Analytics ID from a page (gramofon.com). The regex looks like this: 'UA[^']++'.

Unfortunately I can't get the Excel formula right. The result should be UA-51025928-1.

#2

Have you tried this one?
https://seotoolsforexcel.com/googleanalyticsid/

#3

Since I need the same function for the Google Tag manager, I need a different solution.

Regex: 'GTM;[^']++'.

Example Google Tag Manger page:

www.home24.de

here GTM-KGG74VH should be displayed.

#4

This one works for me:
=RegexpFindOnUrl(A1;"id=(gtm-\w+)";1)

Assuming the code only have letters and numbers. and exists in the id attribute.

#5

Thank you!