Rich-text Reply

Testing A Button On A Profile Page

joejob 05-03-16
Accepted Solution

Testing A Button On A Profile Page

Hi,

 

I want to run a test on a button on the profile page of my site. Every profile on my site has a different URL, for example:

 

mysite.com/james

mysite.com/sarah

mysite.com/mark

 

How can i define the url in the experiment as it's different for every single profile? Thanks in advnace for your help.

Level 2

Re: Testing A Button On A Profile Page

Hey Joe,

If each profile URL is different but they are in a specific URL subfolder you can target with regex or substring match URLs. Otherwise you can use a meta tag or custom javascript to identify that page type in your code and then use that identifier to trigger your test with conditional activation.

Hopefully that helps!
-----

Daniel


Digital Marketing Manager - mindbodygreen
Optiverse User Group Leader - NYC
joejob 05-03-16
 

Re: Testing A Button On A Profile Page

Thanks for your reply Daniel.

They don't belong in a sub folder. They are as follows:

mysite.com/james
mysite.com/sarah
mysite.com/mark

Do you have any info / guidelines that i could follow for the other methods? Thanks again.
Level 2

Re: Testing A Button On A Profile Page

Hey Joe,

 

Ok no problem. Here are a couple technical guides to help:

 

Basically what you would need to do is add a meta tag into the profile page code template that goes above the optimizely script. It could be something like this (not 100% sure this exact line will work, but gives you an idea):

<meta name="page" content="profile" />

Then in your experiment's options, click Activation Mode, then select Conditional Activation and use the resources to help write a line of javascript to identify the meta value when it equals profile. That way the experiment changes will only trigger when that value is found. Then you can just leave the URL targeting to a substring match of your domain: mysite.com/

 

The whole thing isn't exactly easy, but I was able to get it done for my out of stock pages, with minimal developer help.

 

-----

Daniel


Digital Marketing Manager - mindbodygreen
Optiverse User Group Leader - NYC
joejob 05-03-16
 

Re: Testing A Button On A Profile Page

Great, thanks i'll look into this... i'm still trying to get my first experiment working... (simple text change on a button, on my home page)... but it doesn't seem to be getting picked up at all.
Level 2
joejob 05-03-16
 

Re: Testing A Button On A Profile Page

Sorry Daniel, should it not work if you just set the 'URL Targeting' to a 'Simple Match'
Level 2

Re: Testing A Button On A Profile Page

Not sure what you mean exactly, but if you use simple match, then the experiment will only run on the exact URL you put in the targeting. If you do substring, it's anything that comes after it.

 

So if you wanted to target mysite.com/john and/or mysite.com/fred, then you need to do substring match and then the conditional activation. If you are just running a test on your homepage, then you can do simple and just mysite.com.

-----

Daniel


Digital Marketing Manager - mindbodygreen
Optiverse User Group Leader - NYC
joejob 05-03-16
 

Re: Testing A Button On A Profile Page

Sorry i meant substring.

Why would i need to run a conditional activation... as the substring match seems to be picking it up just fine.
Level 2

Re: Testing A Button On A Profile Page

It depends. If there are absolutely no other page types that have the same elements as the profile pages, then you can get away with just using the substring match and no conditional activation. The problems arise when the experiment code fires on a page it's not really supposed to and causes it to break or look different. 

 

Let's say you change a button color on mysite.com/jeff and do a substring match to mysite.com/. If there is a button on mysite.com/about or mysite.com/products, and it's classified as the same element in your code, the button color of that will change too. So you need to be careful about testing your variations across all your page types to ensure it isn't changing anything on non-profile pages.

-----

Daniel


Digital Marketing Manager - mindbodygreen
Optiverse User Group Leader - NYC
joejob 05-04-16
 

Re: Testing A Button On A Profile Page

That's great Daniel... i was thinking the same.

Thanks you so much for your help, it is much appreciated Daniel.
Level 2