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

Try to track internal link on adobe launch

Avatar

Avatar
Boost 1
Level 1
akshays10917848
Level 1

Likes

2 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
akshays10917848
Level 1

Likes

2 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
akshays10917848
Level 1

19-12-2018

Hi,

I am trying to track the internal link of the below categories.

1650022_pastedImage_1.png

below is the html part:

1650032_pastedImage_3.png

I want the link names on every click. like:'Gallery', 'Codes' etc.

Created a data element with custom code:

1650040_pastedImage_12.png

below is the JavaScript code which is in the editor:

1650044_pastedImage_13.png

On Adobe launch, i Set this rule below:

1650038_pastedImage_8.png

I want to track the click on the categories, so select the 'click' event type and added the css selector part below:

1650033_pastedImage_4.png

Added a simple condition which will work easily:

1650034_pastedImage_7.png

Now in Action Configuration, i set the variables: evar4 Set as %Custom_catching_li_value%

1650047_pastedImage_14.png

But in launch assets request, v4 is not coming, c2 is coming null, events: event4

Can anyone help, How to fix this and make it better?

Please help to advise.

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
StewSchilling
MVP

Likes

342 likes

Total Posts

278 posts

Correct Reply

85 solutions
Top badges earned
Coach
Give Back 25
Springboard
Bedrock
Validate 1
View profile

Avatar
Coach
MVP
StewSchilling
MVP

Likes

342 likes

Total Posts

278 posts

Correct Reply

85 solutions
Top badges earned
Coach
Give Back 25
Springboard
Bedrock
Validate 1
View profile
StewSchilling
MVP

20-12-2018

This looks pretty good with the exception of how you are using data elements.

There are a couple things worth noting:

1). There is no need to set up event listeners in code.  Launch does all that for you depending on the type of event that triggers your rule.

2). Data Elements are like functions that get called whenever they are referenced.  If the data element is Core > Custom code, that code is expected to return something.  In yours, you establish a listener that has a return, but it won't be fed back as the return value of the data element.  Also, there is a timing issue, since the data element is not evaluated until after the rule is triggered, which then sets up a listener that might get triggered upon the next click.

Anyway, while there are some legitimate reasons to set up event listeners in custom JS in Launch, those cases are pretty rare.

So...  What's the solution?

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
StewSchilling
MVP

Likes

342 likes

Total Posts

278 posts

Correct Reply

85 solutions
Top badges earned
Coach
Give Back 25
Springboard
Bedrock
Validate 1
View profile

Avatar
Coach
MVP
StewSchilling
MVP

Likes

342 likes

Total Posts

278 posts

Correct Reply

85 solutions
Top badges earned
Coach
Give Back 25
Springboard
Bedrock
Validate 1
View profile
StewSchilling
MVP

04-01-2019

Did this help?  Did it solve your issue?  If so, please mark the answer as correct.  If not, let's pick the discussion back up.

-Stew