Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Determining if prop values came from custom link or page view

MJ_1963
Level 3
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
MJ_1963
Correct answer by
Level 3
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
alison_smith
Level 1
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.

MJ_1963
Correct answer by
Level 3
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