Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Determining if prop values came from custom link or page view

Avatar

Level 3

If I'm populating the same variable (s.prop) with the same data from a custom link and a page view, is there a way to differentiate between the different sources (page vs. custom link) when I look at the values in that prop? If so how? Also what about when the variable is a list prop?

 

Example Page View:

    s.pageName='Home";

    s.prop1="1|2|3";

Example Custom Link:

    s.linkTrackVars = "prop1";

    s.linkTrackEvents = "None";

    s.prop1="A|B|C";

    s.tl(true,'o','Custom Link Call');

1 Accepted Solution

Avatar

Correct answer by
Level 3

Alison Smith wrote...

You can breakdown the prop by the Custom Link name.  A null value would indicate it was generated from a page view.

And likewise, you could breakdown the prop by the Page Name.  Custom Links don't record the page name (although you see it generated in the call to SiteCatalyst in a debugger).

Alternatively, since you can only breakdown one prop value at a time which is tedious, I'd suggest prefixing the prop value with 'l:' for link and/or 'p:' for page, so in your report you'd see:

l:A|B|C

p:A|B|C

You could still use SAINT to roll these up into a summary 'A|B|C' value when required.

 


I really like you idea! Thajks for the great insight!

View solution in original post

2 Replies

Avatar

Level 1

You can breakdown the prop by the Custom Link name.  A null value would indicate it was generated from a page view.

And likewise, you could breakdown the prop by the Page Name.  Custom Links don't record the page name (although you see it generated in the call to SiteCatalyst in a debugger).

Alternatively, since you can only breakdown one prop value at a time which is tedious, I'd suggest prefixing the prop value with 'l:' for link and/or 'p:' for page, so in your report you'd see:

l:A|B|C

p:A|B|C

You could still use SAINT to roll these up into a summary 'A|B|C' value when required.

Avatar

Correct answer by
Level 3

Alison Smith wrote...

You can breakdown the prop by the Custom Link name.  A null value would indicate it was generated from a page view.

And likewise, you could breakdown the prop by the Page Name.  Custom Links don't record the page name (although you see it generated in the call to SiteCatalyst in a debugger).

Alternatively, since you can only breakdown one prop value at a time which is tedious, I'd suggest prefixing the prop value with 'l:' for link and/or 'p:' for page, so in your report you'd see:

l:A|B|C

p:A|B|C

You could still use SAINT to roll these up into a summary 'A|B|C' value when required.

 


I really like you idea! Thajks for the great insight!