THREE Goals Firing at the same time

Hello,

The website is https://crosworks.com/ and the Piwik Pro instance is crosworks.

I created three goals for the utility navigation floating on the right side:

  1. Clicked on utility menu calendar icon
  2. Clicked on utility menu email icon
  3. Clicked on utility menu telephone icon

Each of them has a unique custom event action BUT whenever one is clicked on, it appears that all three goals are counted at the same time. Here’s one session log:

And here’s a debug mode session that I just did, clicking on just icon which resulted in just one tag firing:

Have I done something wrong? Or is there something wrong with how the utility navigation is built?

Hello David,

I think there is a problem with your triggers for those tags - you are using inner text as a parameter and “contains” rule in trigger.

When you click <div> element that contains all three buttons this technically equals true and is triggering event for all of them at once (because div contains all three inner text triggers).

@jfidala

Here are my triggers:

Click Text Capturer contains email
Click Text Capturer contains 6145382808
Click Text Capturer contains Schedule a Call

(Note: “Click Text Capturer” is a JS variable that I added to the Piwik Pro tag manager based on another post here in the community since, unlike GTM, this is not native variable in PPTM:

function() {
e = window.event;
if (e && e.target && e.target.tagName !== “BODY”){
return e.target.textContent || e.target.innerText;
};
}
)

@David_Culbertson

Correct, and if you click on the <div> frame instead of a buttons you are checking all of above click text capturers as true, because that <div> contains all of those three texts in buttons

Triggers need to be done in different way that separates them in more precise way.

@jfidala

Thank you for the clarification. This is really above my skill level. Do you see anything distinctive that I could use for the triggers?

@David_Culbertson

You could try to set it up for Click Classes + equals + paste exact class of each button for each trigger. I would test it on mobile device just to be 100% sure if it’s firing correctly.

ie. class for calendar button:
ls-action ls-action-T ls-icon-calendarday livesite-schedule ls-desktop ls-ab-action ls-theme-label

@jfidala

I am about to lose my mind. I’ve created three click class triggers and modifed the tags to fire when the click class is found (using “contains”).

Even though the data layer contains the same exact click classes as the triggers, the tags don’t fire. Here’s the info for one of the three:

TRIGGER:
click classes
contains
ls-action ls-action-T ls-icon-calendarday livesite-schedule ls-desktop ls-ab-action ls-theme-label

DATA LAYER:
click classes
“ls-action ls-action-T ls-icon-calendarday livesite-schedule ls-desktop ls-ab-action ls-theme-label”

Data layer
string

@David_Culbertson
I couldn’t find that exact class with inspector tool and I found out there are some additional spaces there, for example:
ls-action ls-action-T ls-icon-calendarday livesite-schedule ls-desktop ls-ab-action ls-theme-label
and class in post above:
ls-action ls-action-T ls-icon-calendarday livesite-schedule ls-desktop ls-ab-action ls-theme-label

Maybe that will help you solve this issue

@jfidala

what inspector tool are you using? When I try it Chrome, the utility menu vanishes.

@David_Culbertson I use just chrome and do shift+ctrl+I → then you can go to elements tab and find your object.

Or just right click on ie. calendar button and use last option → inspect (last option)

@jfidala

Thank you! The click class triggers are now working but only time will tell if this resolves the multiple goal count issue.

For mobile devices, I’m not getting tracking. I’m guessing that within the click classes, “ls-desktop” id different. Maybe “ls-desktop” Unfortunately, I can’t find a straightforward way run an inspector console on iPhone/Safari. I did try switching Chrome’s inspector tools over to mobile, but that appears to just change screen size. On my iPhone, the utility menu is in a completely different location (bottom left of screen versus upper right on desktop)

@David_Culbertson Go to your inspector tool in the chrome and in top left corner you can use second button from the left (Toggle device toolbar):

Refresh the page and it should load a mobile layout.

Classes for mobile are different, and as you said it changes ls-desktop to ls mobile but few other classes are coded in other order compared to previous one:
ls-action ls-actions-open livesite-call ls-action-T ls-icon-phone ls-visible ls-mobile ls-ab-open livesite-icon-phone ls-theme-label

If you want to be sure that it fires no matter what data is set in classes and you have access to the code you can add a dataLayer.push event and use it as a trigger for interaction instead.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.