Highlighted

Content Modification with css

Silver Contributor
Silver Contributor
Hello, Based on content of a cookie (set with split segmentation) my customer would like to show one rss feed or another. This is what he came up with... but unfortunately it doesn't work.... so version A would be xpath : /html/head position : end of node content : version B would be xpath : /html/head position : end of node content : Any idea why ? /P
8 REPLIES 8
Highlighted

Content Modification with css

Employee Emeritus
What scope does the Split Segmentation extension have?
Highlighted

Content Modification with css

Employee Emeritus
Hi Philippe, First I think we would benefit from greater detail around what your customer is trying to accomplish. That being said... I tested the scenario above in the following way: 1) Set a split segmentation with a scope of Pre-Loader: 50% to A and 50% to B in a cookie called 'css_split_test' 2) Added a content modification extension that added a style with the condition that my cookie from the split segmentation cookie has a value of "A" 3) Duplicated the original content modification extension changed the style slightly and changed the condition to value "B" This worked in my test environment, but that doesn't mean it's necessarily the best solution. From a troubleshooting standpoint here are the questions that I would start with: 0) are there any JS errors shown in the browser JS console? If so, are they interrupting utag.js? 1) Do all of the segments being set by the Split Segment extension add up to 100%? (If they do not, and are either under OR over 100% unexpected behavior will ensue) 2) Is the proper identifier being used in the content modification extensions? 3) Is the correct class being defined for the content modification (if it's defining a new class that isn't called by the desired objects it won't work or if the existing class is improperly identified) 4) Is the split segment cookie getting set before the content modification extensions run? 4a) if you disable the split segment extension and then manually set the cookie via browser developer tools and refresh the page -- what is the behavior? If the cookie is not getting set before your content modification extensions run their conditions will always evaluate to false 5) What is the condition you are using for the content modification extensions? 5a) is it evaluating in the expected manner?
Highlighted

Content Modification with css

Silver Contributor
Silver Contributor
Scope is DOM ready,
Highlighted

Content Modification with css

Employee Emeritus
You should set the split segmentation extension to the scope of Pre Loader to ensure that it runs prior to the content modification extension.
Highlighted

Content Modification with css

Silver Contributor
Silver Contributor
Hi Clint, To shortcut, the split segmentation works fine : 50-50 and the cookie switches fine. they use an own developed CMS that generates CSS feeds. The thing we are after : instead of content modification and place content X in case of condition A and content Y in case of condition B, they actually load both content blocks and want to show one css feed or another. So when condition A is valid : and when condition B is valid :
Highlighted

Content Modification with css

Employee Emeritus
What is the observed behavior? Are both blocks being shown or not shown?
Highlighted

Content Modification with css

Employee Emeritus
I still believe that this is a timing issue. If you look at http://tech.tagthis.co/clint/ you will see that either the Kelly Slater thumbnail (segment B) or the Heitor Alves thumbnail (Segment A) is being hidden based on the css_split_test cookie value.
Highlighted

Content Modification with css

Silver Contributor
Silver Contributor
Hi, Sorry to have left this without feedback. We got it working ! And one of the solutions was indeed a timing issue.