There seems to be a problem getting segmentation data. I'm only getting colons ":" instead of profile variables.

Comments

budda’s picture

Version: 7.x-1.x-dev » 4.7.x-1.x-dev

I've just incstalled the 4.7 version of google analytics on a clean 4.7 Drupal install.
I tested with a plain text field profile value, and a list selection value.

Both of these profile values were then selected to appear in the segmentation variable.

Tests showed them appearing as expected in the footer of the site pages.

What sort of profile values are you trying to include in the segmentation variable?

JoshLangner’s picture

Did some checking. Still getting strange ":" instead of any kind of variable. These are from custom profile fields, but only text (i.e. letters, numbers, etc.).

Also, is there a way to separate multiple profile values? Right now, multiple values look like "value1:value2" in GA. I would rather they were added separately (i.e. "value1" + "value2"), so I could filter them individually in GA.

budda’s picture

Taken from my source:

There is one major limitation to the Cross Segmentation functionality. You can only set one custom segment cookie at a time, therefore you can only set one custom segment, per visitor, at a time. Luckily this is pretty easy to get around. Recently, I wanted to track the conversion rate for certain genders and age groups. So I wrote some custom JavaScript that takes the gender data and age data from a form, combines it into a single string, and then sets the custom segment cookie.

Hence the use of the ':' which you are seeing in the generated javascript code.

As for the bug - if you create a fresh Drupal install withthe module, and profile module, can you recreate it the problem? I couldn't.

Do you have any starange characters in your profile field names?

budda’s picture

JoshLangner’s picture

Looks like your update might have solved the ":" for non-authenticated users--perhaps this was the problem I had. I just installed the module today and am waiting to see the new data.

budda’s picture

Status: Active » Fixed

Yeah showing profile data for an anonymous user isn't really possible, so I added a check for this in the code to prevent the empty ':' from showing.

It would have helped locate this issue if your report mentioned it only appearing when nobody was logged in :)

Anonymous’s picture

Status: Fixed » Closed (fixed)