gtag on mobile link

joaopeixoto
70 Posts
joaopeixoto posted this 29 September 2023
Ask a Question

How do I add google tags in my website using nicepage?'

I want to track users that press the phone button.

Google says I have to add this in my button:

<button onclick="return gtag_report_conversion('tel:800-123-4567')">Ligue agora!</button>

You can check the website where it says that here:

gtag

How do I add google tags in my website using nicepage?' I want to track users that press the phone button. Google says I have to add this in my button: <button onclick="return gtag_report_conversion('tel:800-123-4567')">Ligue agora!</button> You can check the website where it says that here: [gtag][1] [1]: https://support.google.com/google-ads/answer/6331304?hl=pt#zippy=,configure-o-acompanhamento-de-convers%C3%B5es-com-a-etiqueta-google
Vote to pay developers attention to this features or issue.
10 Replies
Order By: Standard | Newest
Support Team
Support Team posted this 01 October 2023

Hello João,

The Gtag code could be added with your Site Settings > HTML > Additional Head HTML.
Please add the code and let us know.
...................................................
Sincerely,
Anna.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello João, The Gtag code could be added with your Site Settings > HTML > Additional Head HTML. Please add the code and let us know. ................................................... Sincerely, Anna. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
joaopeixoto
70 Posts
joaopeixoto posted this 01 October 2023

I put google tag manager in additional head html...but google says I need to put the buttons I need to check with those tags I showed in my first message.

I send again a link that show you that:

this time in english:

gtag in button

I put google tag manager in additional head html...but google says I need to put the buttons I need to check with those tags I showed in my first message. I send again a link that show you that: this time in english: [gtag in button][1] [1]: https://support.google.com/google-ads/answer/6331304?hl=en#zippy=,configure-o-acompanhamento-de-convers%C3%B5es-com-a-etiqueta-google,set-up-conversion-tracking-using-the-google-tag
Support Team
Support Team posted this 01 October 2023

Hello João,

Please specify what exact assistance you need from Nicepage.

Following the Google instructions:

On your website, open the HTML for the page with the button or link that you want to track. Insert the event snippet between the head tags () of your page, right after the Google tag.

In Nicepage this can be done with Page Settings > HTML

You'll now need to add an onclick attribute directly to the code for the button or link you want to track. The particular code you use will depend on how the link or button is displayed on your site: as a text link, a button, or a button image.

What exact element do you use on the page?
...................................................
Sincerely,
Anna.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello João, Please specify what exact assistance you need from Nicepage. Following the Google instructions: > On your website, open the HTML for the page with the button or link that you want to track. Insert the event snippet between the head tags (<head></head>) of your page, right after the Google tag. In Nicepage this can be done with Page Settings > HTML > You'll now need to add an onclick attribute directly to the code for the button or link you want to track. The particular code you use will depend on how the link or button is displayed on your site: as a text link, a button, or a button image. What exact element do you use on the page? ................................................... Sincerely, Anna. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
joaopeixoto
70 Posts
joaopeixoto posted this 01 October 2023

First, create a conversion action (Learn more about how to Set up conversion tracking for your website.) if tracking clicks for a desktop site or Track clicks on a phone number on your mobile website, (if tracking clicks for a mobile site). When you reach the part about setting up the tag, make sure that you select the Click option, instead of Page load. The event snippet will look like this:

function gtag_report_conversion(url) {

 var callback = function () {
 if (typeof(url) != 'undefined') {
  window.location = url;
}

};
gtag('event', 'conversion', {

  'send_to': 'TAG_ID/CONVERSION_LABEL',
  'value': 1.0,
  'currency': 'USD',
 'event_callback': callback

});
return false;
}

This I done where you said.

but there are more steps....

You'll now need to add an onclick attribute directly to the code for the button or link you want to track. The particular code you use will depend on how the link or button is displayed on your site: as a text link, a button, or a button image.
Add the code to a text link: This code shows you how to add click tracking functionality to a link using the tag. In the code below, replace “http://example.com/your-link” with the destination URL of your link or “800-123-4567” with the phone number on your website, and replace “Download now!” or "Call now!" with your link text. The code that should be added to the link tag is highlighted in yellow.
Download now!
or

Call now!

Add the code to a button: This code shows you how to add click tracking functionality to a button using the tag. In the code below, replace “http://example.com/your-link” with the destination URL of your link or “800-123-4567” with the phone number on your website.
Submit
or

Call now!

Add the code to a button image: In the code below, replace “download_button.gif” with your button image, replace the width and height with your button’s parameters, and replace “http://example.com/your-link” with the URL for your link or “800-123-4567” with the phone number on your website.
<img src="download_button.gif" alt="Download Whitepaper"

    width="32" height="32"
    onclick="return gtag_report_conversion('http://example.com/your-link')" />

or

<img src alt width height>

For conversion tracking to work, you'll need to add both the event snippet and the appropriate onclick code from one of the examples above to the page that has the link or button. This tells Google Ads to record a conversion only when a customer clicks on the link or button.

First, create a conversion action (Learn more about how to Set up conversion tracking for your website.) if tracking clicks for a desktop site or Track clicks on a phone number on your mobile website, (if tracking clicks for a mobile site). When you reach the part about setting up the tag, make sure that you select the Click option, instead of Page load. The event snippet will look like this: function gtag_report_conversion(url) { var callback = function () { if (typeof(url) != 'undefined') { window.location = url; } }; gtag('event', 'conversion', { 'send_to': 'TAG_ID/CONVERSION_LABEL', 'value': 1.0, 'currency': 'USD', 'event_callback': callback }); return false; } This I done where you said. but there are more steps.... You&#39;ll now need to add an onclick attribute directly to the code for the button or link you want to track. The particular code you use will depend on how the link or button is displayed on your site: as a text link, a button, or a button image. Add the code to a text link: This code shows you how to add click tracking functionality to a link using the tag. In the code below, replace “http://example.com/your-link” with the destination URL of your link or “800-123-4567” with the phone number on your website, and replace “Download now!” or &quot;Call now!&quot; with your link text. The code that should be added to the link tag is highlighted in yellow. Download now! or Call now! Add the code to a button: This code shows you how to add click tracking functionality to a button using the tag. In the code below, replace “http://example.com/your-link” with the destination URL of your link or “800-123-4567” with the phone number on your website. Submit or Call now! Add the code to a button image: In the code below, replace “download_button.gif” with your button image, replace the width and height with your button’s parameters, and replace “http://example.com/your-link” with the URL for your link or “800-123-4567” with the phone number on your website. &lt;img src=&quot;download_button.gif&quot; alt=&quot;Download Whitepaper&quot; width="32" height="32" onclick="return gtag_report_conversion('http://example.com/your-link')" /> or &lt;img src alt width height&gt; For conversion tracking to work, you'll need to add both the event snippet and the appropriate onclick code from one of the examples above to the page that has the link or button. This tells Google Ads to record a conversion only when a customer clicks on the link or button.
joaopeixoto
70 Posts
joaopeixoto posted this 01 October 2023

Just read the link I said you. dont read only 1 paragraph....

what I want I wrote in first post...

"How do I add google tags in my website using nicepage?'

I want to track users that press the phone button."

Just read the link I said you. dont read only 1 paragraph.... what I want I wrote in first post... "How do I add google tags in my website using nicepage?' I want to track users that press the phone button."
Support Team
Support Team posted this 02 October 2023

Hi João,

There is no way to edit the code of a ready button and add custom tags in it. You may try to create a button using the HTML element with the whole button code including the tag.

...................................................
Sincerely,
Hella
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi João, There is no way to edit the code of a ready button and add custom tags in it. You may try to create a button using the HTML element with the whole button code including the tag. ................................................... Sincerely, Hella Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
joaopeixoto
70 Posts
joaopeixoto posted this 02 October 2023

What's the point of having site settings>google>google tag manager If I can't insert tags in clickable elements?

What I miss?

Even the element you can insert the google tag manager (GTM) gives me an error like I show in the attachments.

What's the point of having site settings>google>google tag manager If I can't insert tags in clickable elements? What I miss? Even the element you can insert the google tag manager (GTM) gives me an error like I show in the attachments.

Last edited 02 October 2023 by joaopeixoto

Support Team
Support Team posted this 03 October 2023

Hi João,

We can add the Google Tag Manager key to the whole site, but there is no option to add some specific keys to specific buttons.
As for the message that you see, it stays that you cannot use Analytics ID and GTM at the same time as GTM includes analytics in it and it may be causing conflicts, so just remove Analytics ID and then it should be working fine.

...................................................
Sincerely,
Hella
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi João, We can add the Google Tag Manager key to the whole site, but there is no option to add some specific keys to specific buttons. As for the message that you see, it stays that you cannot use Analytics ID and GTM at the same time as GTM includes analytics in it and it may be causing conflicts, so just remove Analytics ID and then it should be working fine. ................................................... Sincerely, Hella Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
joaopeixoto
70 Posts
joaopeixoto posted this 03 October 2023

Yes it works without Analytics ID. Thanks.

Nicepage should consider adding tags to links.
It's not hard to implement that. Just add 3 fields (label, value, currency) to the links we want to tag after a check box to tell that link is taged. Nicepage with that info creates the code above I showed easy.

Regards,

Joao Peixoto.

Yes it works without Analytics ID. Thanks. Nicepage should consider adding tags to links. It's not hard to implement that. Just add 3 fields (label, value, currency) to the links we want to tag after a check box to tell that link is taged. Nicepage with that info creates the code above I showed easy. Regards, Joao Peixoto.
Support Team
Support Team posted this 03 October 2023

Hi João,

Thanks, we'll consider your suggestion for our wishlist.

...................................................
Sincerely,
Hella
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi João, Thanks, we'll consider your suggestion for our wishlist. ................................................... Sincerely, Hella Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
You must log in or register to leave comments