Profile cover photo
Profile photo
Phil Pearce
1,268 followers
1,268 followers
About
Phil Pearce's posts

Post has attachment
Hi All,

Quick question... Has anyone created a JS variable to read Xpath @id or @class - I just got asked this question in a #GTM training session & wondered if anyone had tried this already?

Many Thanks!

Phil

Ref: https://stackoverflow.com/questions/2661818/javascript-get-xpath-of-a-node

+Dave Elliott

Hi All,

Does anyone know the GoogleForm URL to manually send a reset password link to all Admin users on a GTM account? A company has had an employee leave and they dont know the Admin login.

Note: the GTM account is: GTM-PSKDLP

Many Thanks!

Phil.

Post has attachment
Hi All,

I noticed that the free version of Google Optimize has native IP-to-country server-side lookup as part of its targeting options.

Being a cheapskate... who wants to pass on cost saving to clients & avoid to pay for a yearly MaxMind or DemandWare IP lookup... I am trying to re-use this variable for Cookie pop-ups and Triggers in GTM.

Thus... does anyone know what the name of this variable is? And is it global scoped so GTM can read it?

I`m currently running a taint test of... changing the countryCode in the Optimise UI to try to identify the variable via a Diff check. However the code minification is making this tricky!!

Note: I suspected the countryCode/cityCode/metricCode is converted into an integer location (i.e same as Adwords LocationID) hence searching for just countryCode=UK does not work :(

If I can crack this code, I`ll let you know!

Alternatively... if you know the variableName - please let me know!

Example code:
https://www.google-analytics.com/gtm/js?id=GTM-PM5S5KP&cid=363883017.1497167917

Thanks!

Phil.

Photo

Post has attachment
I updated my generic GTM containers templates/recipes to use the new Centralised Google Settings Variable.

The generic login for these is:
username: coolgtmstuff@gmail.com
password: philrulesgtm8

Or if the login does not work you can import using these links...

Generic CMS:
https://www.dropbox.com/s/woak00y749jk36e/AUTO-EVENTS%20-%20NEW%20interface.json?dl=0

Wordpress (mapped to GTM for Wordpress)
https://www.dropbox.com/s/qgzd0lny273j100/WORDPRESS%20TEMPLATE%20-%20NEW%20interface.json?dl=0
https://en-gb.wordpress.org/plugins/duracelltomi-google-tag-manager/

Magento (mapped to Qubit dataLayer)
https://www.dropbox.com/s/rc2ew58w3ls3quk/MAGENTO%20-%20mapped%20to%20qubit%20-%20NEW%20interface.json?dl=0
https://www.magentocommerce.com/magento-connect/qubit-universal-variable.html

Drupal (mapped to plugin)
https://www.dropbox.com/s/uoa19tp8zjt4c03/DRUPAL%20-%20work%20in%20progress%20-%20NEW%20interface.json?dl=0
https://www.drupal.org/project/google_tag
https://www.drupal.org/project/datalayer
https://www.drupal.org/project/commerce_google_tag_manager

Bootstrap
https://www.dropbox.com/s/bly0i85i134qe6a/BOOTSTRAP%20-%20DEMO%20SITE%20-%20NEW%20interface.json?dl=0

Angulartics (mapped to plugin)
https://www.dropbox.com/s/bbkchg7m32eu06t/Angulartics.json?dl=0
http://angulartics.github.io/

AMP (new)
https://www.dropbox.com/s/01ccor3fmbx6hfr/AMP.json?dl=0

APP - iOS FireBase (new)
https://www.dropbox.com/s/8f1s561xe4ehqop/APP%20-%20NEW%20interface%20-%20FireBase.json?dl=0

APP - Legacy
https://www.dropbox.com/s/8lzc5o7awwtijat/APP%20-%20NEW%20interface.json?dl=0

JSONLD
https://www.dropbox.com/s/d7ti8fv8vfhdf3e/JSON%20-ld%20-%20NEW%20interface.json?dl=0

Yandex.Metrika
https://www.dropbox.com/s/b38649b2o0izqm3/Yandex.Metrika%20-%20NEW%20interface.json?dl=0

AffiliateId Monster Script (advanced example)
https://www.dropbox.com/s/umbkqi7w2wf2cc1/AffiliateMonsterGTMfileToImport.json?dl=0
https://www.periscope.tv/MeasureCamp/1PlKQZyMDmMGE (video)
https://www.slideshare.net/phildpearce/morphing-ga-into-an-affiliate-analytics-monster (slides)
https://bit.ly/analyticsmonstervideo (video)

Thanks

Phil.

Just a Sanity check... I'm using the new centralised Google Setting Variable.

1. Does it matter if ContentGroups are declared on GA Events? (or are these ignored on GA Events & only sent on GA pageviews... so it does not matter).

2. Also, same question applies to CrossDomain autoLinker which only activates on pageviews.

3. Lastly, the 'GA object' field can not be set to inherit Centralised Google Settings, only manually set. Is this a mistake/bug?

Thanks

Phil.



Post has attachment
Just after a second opinion...

Assuming that GA & GTM share the same SLA on GA premium, and that the 12 hour GTM server bug/outage last week also knocked-out GA hit data... does this mean that the client is entitled to a refund of 12hours of the GAP license?
https://www.google.com/appsstatus#hl=en&v=issue&sid=18&iid=bfc3fd8b6dcf2e4a1515f2c208bbdab2

My assumption is yes, but I am after other peoples feedback...





Post has attachment
Hi All,

I have 3 use case where it is necessary to gtm.js locally:

1) Website operators in China.
2) Hosted payment portal do not allow 3rd party scripts.
3) iFrames where postMessageAPI is not possible.

For the 3rd example I see this CORS error message: SecurityError (DOM Exception 18) Blocked frame with origin "https://www.clientdomain.com" from accessing frame with origin "https://www.googletagmanager.com": Protocols, domains and ports must match.

Thus, given this requirement has anyone tried hosting GTM locally? Does this work & what are the pitfalls?

https://www.googletagmanager.com/gtm.js?id=GTM-xxxx
copied to...
https://www.clientdomain.com/gtm.js?id=GTM-xxxx

I understand that...
- Preview and ShareLink preview may not work.
- There would be a 1hr-ish caching delay when gtm.js is copied from remove to local.
- I would not benefit from a GEO-optimised CDN, if I host locally.

Are there any other negative connotations & has anyone done this already? (e.g. I see that Telium and Ensighten offer it as an option).

Many Thanks

Phil.

Ref:
https://wordpress.org/plugins/host-analyticsjs-local/
https://community.keycdn.com/t/hosting-google-analytics-locally/437
https://medium.freecodecamp.com/save-your-analytics-from-content-blockers-7ee08c6ec7ee

Post has attachment

Post has attachment

Post has attachment
Hi All,

Just after a sanity check...

I`m stick on a problem with exclude referrals not working in Universal.

Scenario is:
- GA universal via GTM
- Exclude referrals for http://paypal.com and http://wirecard.com added in GA settings

However, http://paypal.com and http://wirecard.com is still shown in the referral report :(

Thus... I tried to add a JS patch via GTM...

function() {
// Clear referrals on payment portals
var regExPaymentPortal = /(^|.+\.)(3ds.+|paypal\.com|wirecard\.com|skrill\.com|giropay\.de)$/i;
if( regExPaymentPortal.test( {{Referral Hostname}} )===true ) {
return undefined; // referral
}
};

That did not work :( So, I tried to remove the risk of GA classic hits causing issue by setting setReferrerOverride to null and also disabled legacyHistoryImport...

<script>
var _gaq = _gaq || [];
_gaq.push(['_setReferrerOverride', undefined ]);
_gaq.push(['_setCampaignTrack', false ]);
</script>

That did not work :( So... I`m stumped.

Notes:
- Site is on Angular running in a Safari (in-app) wrapper.
- A fixed tracker name is being used to avoid rogue referrals.
- Thankyou page is on SSL thus https://paypal.com referral is passed to this SSL page.
- There is a chance that there is another Thankyou page which does not have setReferral=null, but this would not explain why the serverside settings for exclude referrals is not working.

Any ideas welcome!

Thanks

Phil.

Ref: https://www.thyngster.com/tips-to-track-an-ajax-based-website-using-gtm-and-universal-analytics/ 
Wait while more posts are being loaded