3.4K members online now
3.4K members online now
Everything you need to know about setting up Optimize including creating your account and container, linking to Google Analytics and how to tag your site.
Guide Me
star_border
Reply
Highlighted

Deploying the Page Hiding Snippet via GTM?

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hi!

 

We are extremely limited in our ability to access our website's code, so was wondering if deploying the Page Hiding Snippet through Google Tag Manager as a custom html tag fired before the Google Optimise tag would work?

1 Expert replyverified_user
Marked as Best Answer.
Solution
Accepted by topic author Alex C
April

Deploying the Page Hiding Snippet via GTM?

Community Manager
# 2
Community Manager

Our recommended method is to install the page-hiding snippet directly on the page: 
https://support.google.com/360suite/optimize/answer/7359264

 

Even if you decide to use the native Optimize tag type: 

https://support.google.com/360suite/optimize/answer/6314801

 

While it's not supported, feel free to test deploying PH as a custom HTML tag in GTM and let us know how it works. 

 

Best,

Jason

Deploying the Page Hiding Snippet via GTM?

Explorer ✭ ✭ ☆
# 3
Explorer ✭ ✭ ☆

Have you tried this alternative? Has it worked? 

Deploying the Page Hiding Snippet via GTM?

Follower ✭ ☆ ☆
# 4
Follower ✭ ☆ ☆

Not yet! We're running a few tests without the snippet since our site is fairly quick as it is, but we're probably giving the snippet a go in a few weeks to compare results.

Deploying the Page Hiding Snippet via GTM?

Explorer ✭ ✭ ☆
# 5
Explorer ✭ ✭ ☆

I decided to give it a shot. Seems to work fine. The experiment is running for more than 2 days and no problem on the horizon. I fired the HTML tag before the GA Tag. 

 

I'll keep you posted if anything goes wrong. 

 

 

Deploying the Page Hiding Snippet via GTM?

Explorer ✭ ✭ ☆
# 6
Explorer ✭ ✭ ☆

It worked for a few days, then we had a monstrous amount of sessions getting on variant 1. Still don't know why it happened. Yet, I'm still gathering data. 

Deploying the Page Hiding Snippet via GTM?

Follower ✭ ☆ ☆
# 7
Follower ✭ ☆ ☆

That's odd - any errors from the page hiding snippet I'd expect to be related to either more sessions for the original non-variant or a drastic reduction in site speed.

Deploying the Page Hiding Snippet via GTM?

Explorer ✭ ✭ ☆
# 8
Explorer ✭ ✭ ☆

Yeah, don't think it's related, but I edited the triggers a bit, and everything seems to work out fine right now.

Re: Deploying the Page Hiding Snippet via GTM?

Follower ✭ ✭ ☆
# 9
Follower ✭ ✭ ☆

May I ask your setup for the page hiding snippet? I have set the PH custom code as setup tag for the GO Tag, which itself is the setup tag for GA page view. Yet the script gets placed pretty much at the end of the body.

Deploying the Page Hiding Snippet via GTM?

Explorer ✭ ✭ ☆
# 10
Explorer ✭ ✭ ☆

Actually, I used the PH snippet for GTM' users (see here), and added it as a tag that fires before GA tag which fires before GO tag. 

Experts in the Topic
Jason O