Expand my Community achievements bar.

Join us for our next community Coffee Break on February 28th! Four of our Analytics Champions will be joining us to discuss Summit tips, best practices, and any of your Analytics questions!
SOLVED

href firing two events when using tel

Avatar

Level 1

hi all,

 

On my website I have an anchor tag that has a property href="tel:0111 111 111"

 

and using the google Chrome extension Omnibug, I can see that Adobe Analytics is firing twice on this event when this link is clicked. 

 

On another element I have, where the href="https://mywebsite.com", the event is only triggered once.

 

They're in separate divs but with the same class name, using the same js function. Everything is identical. After a trial-and-error investigation, I found the only difference is the tel: number inside the href. 

 

I've turned off the setting 'Show redirected entries' in case it was a redirect. I cannot see the data myself, but someone else has assured me that they are indeed seeing this double event within their analytics. 

 

I've also removed another element inside the div so that the anchor tag is the only element, to remove any possibility of bubbling events happening, but it still fires twice.

Ideally the href for tel should only fire once. 
Has anyone else come across this or have some ideas?

 

Thanks in advance

UPDATE to provide code (some edits to keep site private):

// this a tag triggers twice 
<div class="website-contact-icon">
        <a class="js-website-contact" href="tel:01111 111 111">
            <partial name="~/Views/Shared/Components/SVG/_IconWebsiteContact.cshtml" />
        </a>
</div>
//this a tag only triggers once
<div class="website-contact-icon">
         <a class="js-website-directions" href="@StoreDirections">
             <partial name="~/Views/Shared/Components/SVG/_IconWebsiteDirections.cshtml" />
         </a>
</div>

Note: the partial component is only a path for an svg file

1 Accepted Solution

Avatar

Correct answer by
Level 1

RESOLVED - This is not actually a problem with analytics but instead, my javascript. For some reason I had another event listener for all href with tel that also fired the tracking. Facepalm. Thanks to all that commented

View solution in original post

3 Replies

Avatar

Level 10

Have you checked whether the tel link click tracking was live before you added a dedicated rule (maybe the second event belongs to the exit link/ custom link tracking managed separately)?

I think the tracking was added after the original pages went live, but even if that was the case, it wouldnt explain why one anchor would do it twice and the other one only the once. I'll update my question to show the markup I have

Avatar

Correct answer by
Level 1

RESOLVED - This is not actually a problem with analytics but instead, my javascript. For some reason I had another event listener for all href with tel that also fired the tracking. Facepalm. Thanks to all that commented