Custom Event Passes in Subsequent Custom Link Call | Community
Skip to main content
johncfl
Level 2
June 11, 2018
Solved

Custom Event Passes in Subsequent Custom Link Call

  • June 11, 2018
  • 3 replies
  • 2646 views

Background

We made a request to our website developer to trigger custom link call A when user clicks a specific button on a page. As part of custom link call A, we also requested to pass custom event 1. After this change we implemented, custom link call A was firing correctly.

The issue we've been noticing though is when a user clicks another button that triggers custom link call B. We noticed that custom event 1 is also passed in custom link call B even though it should only pass in custom link call A. Can anyone suggest any direction we should point our developers to in order to fix this problem?

Our developer said: the parameter field is set to {} (empty object) for custom link call B. That means that it is Omniture setting the event values, not the front-end code.

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 Waqas_Rafiq

Hi John,

After your initial click on the first button, try calling s.clearVars();

The s.clearVars() Function

That would ensure that any previous variables set are not associated with the next ones.

Hope it helps.

/Waqas

3 replies

Waqas_Rafiq
Waqas_RafiqAccepted solution
Level 4
June 11, 2018

Hi John,

After your initial click on the first button, try calling s.clearVars();

The s.clearVars() Function

That would ensure that any previous variables set are not associated with the next ones.

Hope it helps.

/Waqas

Pablo_Childe
Community Advisor
Community Advisor
June 12, 2018

I would recommend DTM here. It is great at allowing you to set custom link events and easily attach secondary props or evars.

Now your problem may be the event you requested is attached to a element or button ID that is used in multiple spots and both trigger the rule. You may need to  tweak each button to make them unique so they dont do that.

GLTU

johncfl
johncflAuthor
Level 2
June 12, 2018

Looks like this will work. Thanks!