Technology Services

New siteopt.js Features for Google Website Optimizer

Google has published some new features/functions within the Google Website Optimizer javascript file, siteopt.js

Outlined below are the new features:

  • Returns replacement content for a section as a string.
  • Undefined indicates that the default content should be used.
  • An empty string is a valid substitution.
  • Returns section variation number, 0 through N-1 where N is the number of variations including the original for the given section.
  • Undefined or 0 indicates default.
  • Returns combination number, 0 through M-1 where M is the total number of combinations, the product of the individual section sizes.
  • Undefined or 0 indicates the original.
  • Returns the combination as a string in the form “A-B-C-…” where “A” is the variation number of the first section, B for the second, etc.
  • Undefined indicates the original, “0-0-0…”.

Please note the following:

  • All of these must be called AFTER the control script has been executed on the page.
  • The utmx function may return ‘undefined’ for a variety of situations and should be tested for.
  • These functions do not query the cookies.
  • Original content is not returned when using these and must be encoded into the page by you.

These functions help make it much easier to implement more complex testing and personalization experiments that previously required the creation of a lot more custom code to accomplish the same thing.

Over the next week we will be doing a series of posts of ways these new features can be used in the experiments you do.

Author

cp_admin

Share
Published by
cp_admin

Recent Posts

Building a Scalable Analytics Program: When to Bring in DXA Tools like Contentsquare

Most analytics programs begin with foundational platforms like Google Analytics or Adobe Analytics. These tools…

3 days ago

Mastering GA Custom Metrics – Best Practices & Pitfalls to Avoid

In our previous post, we covered why custom metrics in GA matter and how to…

1 week ago

Unlocking User Behavior: The Power of Session Replay + AI Analytics

In today’s fast-paced digital world, marketing and product teams don’t just need data—they need answers,…

2 weeks ago

This website uses cookies.