Google Tag Manager isn't tracking mobile click to calls - debugging

I am trying to track clicks on the phone number on the website. After I set up the trigger using following settings:
Trigger Type: all elements;
Page URL: contains "tel:" ;
Click Text: contains "13";
With these settings, the trigger is firing correctly on the desktop but isn't working on mobile.
I tried to use only "Page URL"/"Text Only"/"Form Text"/"Form contains" as conditions for the trigger to fire, but all attempts are unsuccessful. I also tried to use "Just Links" as a trigger type but it's not helping.
I also tested the URL in different mobile browsers (chrome/safari) and emulator. With an emulator, the tag is firing correctly but it's not working on the
Please have a look at the preview to see the page and tracking I am talking about:
https://www.googletagmanager.com/start_preview/gtm?uiv2&id=GTM-T92J432&gtm_auth=MmNY2ZtOefQOp1Kce4yUFQ&gtm_preview=env-5&gtm_debug=x&url=https://lp.acfc.com.au/good-credit
I appreciate your advice on what is the problem and how it can be fixed.
Thanks!
Kirill

Actually, better way of doing this to set generic trigger in GTM, then you will be able to track any phones on your website:
1) Enable built-in variable Click Element (if you already have it, you can skip this step)
2) Create trigger, which will fire for all links which have tel:***** (it can be any phone).
CSS selector on the screenshot is a[href*="tel:"]
3) Create a tag, which will send data to GA
4) Check your events in GA.
Keep in mind that it might take a couple of hours to appear in Behaviour-> Events tab. Or you can check it immediately in Real Time -> Events tab

RESOLVED:
I just found out that in order to identify an event it is safer to look at how the data layer is changing after the action rather than on the "Variable" tab.
By doing so, you can see what data is actually going to google analytics, and it is more stable to use it as an ID for a trigger to fire.
In my case, I've had only elementURL that was pushed back to the datalayer. I used the parameter elementID equals "tel:xxxxxx" to make the tracker work. Hope it will help (just put your number instead of x).
Cheers!

Related

Cypress test fails but works when tested manually

I am trying to test the ability to retrieve results from a database. When running a test that logs in, navigates to the search tab and searches a word, I am getting a 401. If I go to the website, use the same log in information and do the exact same steps, it works perfectly. Here's the last few steps of the test:
cy.contains('Search').click(); //open tab
cy.contains('Search by').click();
cy.contains('Name').click();
cy.get('.search-field').type('Jane');
cy.get('.search-btn').click();
There's a drop down menu for what you want to search by, a textfield for the search word and a search button. I can't share all of the code but I can see from the video that logging in and all the following steps are performed as supposed to. What kind of things can cause a cypress test to return different results as opposed to manually performing the action? I added wait(2000)'s in between the steps but it made no difference.
Maybe there is an event that needs to be triggered before the page is able to search.
Take a look at the element you are typing into in the devtools, under the Event Listeners tab.
For example, the StackOverflow search box has an event for s-popover:show listed there - if testing that you would .trigger('s-popover:show') to fire that event and display the instruction tooltip.
So try something like this
cy.get('.search-field')
.type('Jane')
.trigger('change') // or .trigger('input')
Cypress deletes localStorage in between tests. In this case that deleted the authorization token which is why I was getting the 401. I installed this package: https://www.npmjs.com/package/cypress-localstorage-commands
After the log in I use
cy.saveLocalStorage();
And before making search
cy.restoreLocalStorage();

Missing GA4 event parameters

I have recently started to use Google Analytics 4 for event tracking, using Google Tag Manager to send events to Analytics. I have set up the custom variables in Tag Manager as well as in GA4.
Everything seems to work very well in Tag Manager's debug mode, and also if I look up the events in real-time view I get the requested event along with all the parameters I have set in Tag Manager. However, once I look up the events for the last couple of days in the Engagement -> Event view, a couple of my parameters are missing, and also I'm not getting the same hit count for each parameter, even though each event has all parameters set:
As you can see, 86 events have been recorded, but the event count for the parameters widely varies.
Here's a screenshot of my Tag manager settings:
I have tried to set up a new event with the same parameters, but (logically) I got the same result. I am under the strong impression I'm missing something obvious here. Does anyone have experience with this, or has anyone come across this same issue?
To be honest, you can just try to click on mark as conversion in the Events tab, and this should save them. I think for some reason GA4 doesn't save parameters otherwise...
i cant get this til work with fields and parameters for an event so i try to create a user custom dimension instead and also to send it as a content group and as user property
also i can see the user id under app instance for the standard report user explorer
but i can't filter on or select this one myself
i cant create the custom parameter reports like gerrit did
but yeah create them as custom dimensions /metric first should be the way
ga4 has a bug when you edit a standard report, you add 3 card and deselect one it still thinks you are maxed out and you have to start over...
the test internal users filters dont work, though you can see data in debug and under events, but since i know they work i know try to just make the filters active

Google Analytics not sending any events or custom dimensions data to dashboard

Scenario:
I am using this module: https://www.drupal.org/project/google_analytics version 3.1
It is using Google Analytics 4. Drupal version 8.9.x
We followed the documentation https://developers.google.com/analytics/devguides/collection/gtagjs/custom-dims-mets to create some custom dimensions and added in the Google Analytics configuration accordingly.
When view the page source, I see code is added there:
gtag("config", "G-MESUREMENT-KEY", {
"custom_map": {
"dimension1":"user_company",
"dimension2":"user_role",
"dimension3":"user_badge_access"
}
}
);
gtag("event", "custom", {
"user_company":"TEST Company",
"user_role":"authenticated, member_administrator, administrator",
"user_badge_access":"Office"
}
);
Using some Chrome GA debugger "GTM/GA", I see parameter is passing there. In the request "Pay Load" of Chrome debugger it shows its sending the values:
en=page_view&ep.anonymize_ip=true
en=page_view
en=custom&ep.user_company=Surface%20Oncology&ep.user_role=authenticated%2C%20member_administrator%2C%20administrator&ep.user_badge_access=Office
BUT I don't see the data when I open DebugView in the GA dashboard! And Interesting part is, some chrome debugger like "Google Analytics Debugger 2.8" when enabled, which seems open a debugger and connect to GA dashboard, DebugView is showing the events and parameters data. So there must be something which restricting or refusing to connect with GA Dashboard to push the data.
Reads lot of documentation, did lot of test but failed to find a reason for that. The site is fully login protected but event /user/login page which is accessible to all, not sending the data at all.
If some one can shed some light on the issue, it will really really help for me. Thanks in advance.
Actually this is my mistake of my understanding. All data is pushing to GA dashboard no confusion. The reason why I don't see data when creating a comparison report based on custom dimension parameters is due to "scope" difference.
So if you want to create a report based on event scoped parameters, please go to Engagement->Events, and if you want to create a report based on user scoped parameters, please go to Audience tab, but user scoped report will not show data if captured users record is less than 10.
A documentation for reference: https://support.google.com/analytics/answer/2709828?hl=en

Adding feedback to chatbot in Bot Composer

I'm creating a chatbot using Bot Composer and want to add a feedback dialog at the end of the conversation.
I was wondering how this feedback would be triggered? I've taken a look and there is a activities trigger called 'Conversation ended (EndOfConversation activity)' that I've tried out but struggling to get it working. I can't find a lot of information/documentation on the use of this trigger. Could it be used to infer the end of a conversation and then send a feedback dialog?
Has anyone managed to add a feedback dialog triggered by the end of a conversation to their chatbot using Bot Composer?
I was wondering how this feedback would be triggered?
Where do you want to trigger it? After the entire dialog has been done, or multiple places in multiple dialogs? One feedback for everything or do you need multiple?
I've taken a look and there is a activities trigger called 'Conversation ended (EndOfConversation activity)' that I've tried out but struggling to get it working. I can't find a lot of information/documentation on the use of this trigger. Could it be used to infer the end of a conversation and then send a feedback dialog?
EndOfConversation happens after everything is done. You won't be able to utilize this to trigger feedback as feedback is part of the conversation and if this event happens, then that is already done.
By default, dialogs automatically end after they complete.
"autoEndDialog": true,
You should add an action to the end (or any appropriate location) of your other dialogs to call (Begin a new dialog) the feedback dialog . You could keep track of whether certain feedback dialogs had been set and check for that value in your dialog to see if it should run again (if using a prompt, you can utilize the "alwaysPrompt" property). There is quite a bit of flexibility and it really depends on your need. But at the simplest scneario; you would make your feedback dialog, and make that the last action in your main dialog.
I hope that helped. If not, please let me know where I can clarify. Feel free to share any code/json/repo if appropriate.
This seems to be an old post but can we have some example to show how this is impleemented. I ammusing the bit framework sdk 4 and this should worked out of the box.x
Somestimes this works

Error accessing Birthday variable using Watir during gmail sign-up

I am trying to create the gmail account through watir. As part of it while I am trying to select the birthday using div element I am unable to do.
I tried with the below one:
#ie.div(:text,'May').click
My system configurations:
IE-8
Windows-7
I've always disliked seeing the answers on here that say 'Why are you doing this?" or "Why would you want to do this?". So I'll just say "Don't do this!". I'm sure whatever issue you are facing can be resolved without automating the creation of gmail account.
If all you need is a unique gmail address then see the link below:
http://www.codestore.net/store.nsf/unid/BLOG-20111201-0411
Another option is https://mailinator.com/
As #titusfortner indicates, that element cannot be selected/clicked because it is not visible. Using watir-webdriver, this snippet makes the dropdown menu visible so its options can be selected:
b.div(title: "Birthday").when_present.click
b.div(text: "May").when_present.click
That being said, there are two other (read: larger) issues:
You won't be able to script your way past the captcha.
Google doesn't want you doing this. That's why the captcha is there, and they'll eventually block your IP if you consistently automate/script against them.
You can't click on the text of something that is not visible on the page. You first need to open the drop-down:
browser.span(id: 'BirthMonth').click
browser.div(text: 'May').click
b.element(:css, '#BirthMonth > div').click
b.element(:text, 'May').click
It works with Chrome and with Firefox also but not perfect

Resources