Can any kind soul help me understand this piece of code -
I want to know what is o.href doing?
Regards,
Sanmeet
Solved! Go to Solution.
Hi Sanmeet,
I believe this function is used for clickmap. It is a callback to get the unique ID of the link. When it is called, the parameter "o" refers to the anchor tag (i.e. <a href="http://adobe.com/"></a>). So, o.href refers to the href attribute/property of the anchor tag. Anyone correct me if I am wrong on that...
Hi Sanmeet,
I believe this function is used for clickmap. It is a callback to get the unique ID of the link. When it is called, the parameter "o" refers to the anchor tag (i.e. <a href="http://adobe.com/"></a>). So, o.href refers to the href attribute/property of the anchor tag. Anyone correct me if I am wrong on that...
Thank you very much buddy. Appreciate the gesture. Please help me understand it further -
"So, o.href refers to the href attribute/property of the anchor tag"
Here o.href refers to which anchor tags? Since, I am not explicitly mentioning the name of the anchor tag.
Thanks!
Views
Replies
Total Likes
Sure thing.
When you put tracking on your pages and you enable click map, the code will basically say, "Give me all links on the page (i.e. give me all anchor tags on the page), then loop through each of them and pass them each individually through the function s_getObjectID to get the ID that I should use to track clicks on that link." So, for each anchor tag (link) on the page, it will be passed through that function s_getObjectID and return an ID to be associated with that link for tracking purposes.
Does that make more sense?
Absolutely!
Thanks a lot buddy!
Views
Replies
Total Likes
Views
Likes
Replies