Determining if prop values came from custom link or page view | Community
Skip to main content
MJ_1963
Level 2
October 16, 2015
Solved

Determining if prop values came from custom link or page view

  • October 16, 2015
  • 2 replies
  • 1203 views

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');

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by MJ_1963

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!

2 replies

alison_smith
October 16, 2015

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.

MJ_1963
MJ_1963AuthorAccepted solution
Level 2
October 16, 2015

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!