Optimize
5.9K members online now
5.9K members online now
Learn how to create your first experiment and get tips on creating A/B, redirect, and multivariate tests.
Guide Me
star_border
Reply

Multivariate Testing on Post Submit Pages

Follower ✭ ✭ ✭
# 1
Follower ✭ ✭ ✭

I'm attempting to build a multivariate test on the results page of a website. Depending on a visitor's submission of a form prior to hitting that page, the results page will deliver different messages (success, failure, etc.) but the url will be the same. 

 

An initial issue I encountered was not being able to access the editor for the results page. I receive a 404 error since hitting the page is dependent on completing the form. Using a number of other testing tools in the past, this would not be an issue since I would still be able to access the editor and input JavaScript code for Section 1: Variant A, Section 1: Variant B, Section 2: Variant A, etc. In these cases, each variant would accept separate JavaScript code, and upon launch, the testing tool would distribute the code accordingly.

 

In the case with Optimize, I'm able to construct the code I'd like to assign to a particular variant within Google Tag Manager (GTM), but because I am unable to access the editor, I've struggled to find a way to associate a piece of code with a particular variant let alone an experiment. 

 

What is the best set up for associating a particular tag with an experiment and variant if the editor cannot be loaded? I had a look at using custom activation, but the documentation for that does not appear to cover how variants are assigned.

 

My current thought is to load up a page that is working for the editor to be able to load up then target the body while setting the conditions within the targeting section of the experiment. This is not ideal, but is the best solution I can think of.

Marked as Best Answer.
Solution
Accepted by topic author Robert C
May

Multivariate Testing on Post Submit Pages

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

Resolved. As anticipated, my final thought was the one that worked (not ideal, but it works).

 

For anyone else reading this, these were the steps I took to use JavaScript the same way it's used in code editors for Adobe Target and Optimizely. As a suggestion, I think it would be great for Google to add a code editor feature similar to the ones found in Target or Optimizely as those just seem a lot more intuitive.

 

1) If the page is not loading, choose any other page on your website. For example, say yoursite.com/results returns a 404 error, set your editor URL to yoursite.com assuming that that works. Now, create all the different variants/sections that you'd like.

 

2) In your code editor, select the head tag and set it to "After opening tag." You'll likely receive some error message saying that a property could not be read, just ignore it.

 

3) Save everything and preview that everything works. If not, then check that the snippet has been installed on that page as that was an initial issue I encountered. If things are still not working, the page hiding snippet might be causing errors as that completely stopped my experiment from showing at all. Another issue that might be causing a problem is that you're logged into two Google accounts, or that you don't have the Google Optimize extension installed.