tag-manager icon indicating copy to clipboard operation
tag-manager copied to clipboard

Google Ads Tag

Open Findus23 opened this issue 5 years ago • 26 comments

followup to #12 (many thanks to @pebosi)

TODO:

  • [ ] add AdwordsConversionTagHelp
  • [ ] check if google_conversion_format needs to be a string
  • [ ] add docs to all parameters and check if they and the validators are correct.
  • [ ] test if it works

Findus23 avatar Aug 04 '18 15:08 Findus23

@peterbo, @duracelltomi I know nothing about Adwords, but I implemented the tag explained in https://tosbourn.com/tracking-adwords-conversion-javascript/

Can you please take a look if it works and if something is broken or missing?

Many thanks!

Findus23 avatar Aug 04 '18 15:08 Findus23

This is great for az initial version but with that, users can not implement dynamic remarketing yet. To be able to do so, this tag template will need a list of user entered key-value pairs. The output should be a JSON object as shown on this page:

https://developers.google.com/adwords-remarketing-tag/implementation

var google_tag_params = { parameter1: 'abc123', parameter2: 29.99 };

duracelltomi avatar Aug 06 '18 20:08 duracelltomi

LGTM - I'm not very familiar with the remarketing feature of the pixel, but it seems quite straight forward. But for the initial version, it looks good!

peterbo avatar Aug 08 '18 21:08 peterbo

@duracelltomi Thanks for the feedback.

Thankfully Matomo has a new UI element that's perfect for entering key-value pairs:

grafik

results in

[{"index":"key1","value":"val"},{"index":"morekey","value":"othervalue"},{"index":"","value":""}]

But I am not sure what exactly you mean with google_tag_params. Do you mean that I should add google_tag_params to the dictionary passed to google_trackConversion?

I'm a bit confused because it doesn't start with google_conversion as the others

Findus23 avatar Aug 09 '18 19:08 Findus23

Does this key-value element also allow to add variables in the "Value" column?

For dynamic remarketing to work, people will need to add dynamic values into the data layer and this will need a variable on the UI and this variable will need to be attached the a value in this table.

The generated output is however not OK, you should add a transformation from this:

[
  {
    "index":"key1",
    "value":"val"
  },
  {
    "index":"morekey",
    "value":"othervalue"
  },
  {
    "index":"","value":""
  }
]

... into this:

{
  "key1": "val",
  "morekey": "othervalue"
}

(ignoring empty lines as well)

duracelltomi avatar Aug 10 '18 05:08 duracelltomi

Does this key-value element also allow to add variables in the "Value" column?

It does now.

you should add a transformation from this:

Thanks for the reminder, I ran out of time yesterday to do it properly.

Is the way I am defining google_tag_params now correct?

Findus23 avatar Aug 10 '18 15:08 Findus23

I am not sure whether google_conversion_label should include the conversion ID as well:

configObject.google_conversion_label = conversionID + '/' + parameters.get('conversionLabel');

google_tag_params should be a global variable within window

duracelltomi avatar Aug 15 '18 09:08 duracelltomi

configObject.google_conversion_label = conversionID + '/' + parameters.get('conversionLabel');

Isn't that what I am doing in https://github.com/matomo-org/tag-manager/pull/50/files#diff-460e870295a18cef54721b951bbf0bbeR42?

google_tag_params should be a global variable within window

Fixed in https://github.com/matomo-org/tag-manager/pull/50/commits/f1ee502db6e44b6dea0411bcae850abe91b2fcba

Findus23 avatar Aug 17 '18 08:08 Findus23

Just created https://github.com/matomo-org/tag-manager/issues/159 (didn't notice this PR.) @Findus23 be great if you could finish the PR and get this merged as a few users have requested the feature :ok_hand:

mattab avatar Apr 11 '19 03:04 mattab

@mattab what we would need is someone to test it which we can't really do ourselves.

tsteur avatar Apr 11 '19 03:04 tsteur

Feedback:

  • Google Adwords was renamed to Google Ads. Could we change the wording and maybe icons to reflect new branding? https://designguidelines.withgoogle.com/ads-branding/google-ads/logos.html#logos-brand-logo-lockups
  • Maybe we could mark this tag as "Beta" and release it so we can ask people to test?
    • Or what is needed to test this feature, we do have a test account if you'd like @Findus23

mattab avatar Apr 11 '19 03:04 mattab

@Findus23 are you still working on this?

tsteur avatar Jun 19 '19 07:06 tsteur

@tsteur No, as I have no way to test it. But I can put updating Logo/Name on my todo list.

Findus23 avatar Jun 19 '19 07:06 Findus23

@Findus23 Be great if you can update name/logo and then we'll work on finding someone to help this new feature. It keeps getting asked from time to time. Thanks!

mattab avatar Nov 19 '19 07:11 mattab

@mattab Done :heavy_check_mark:

Findus23 avatar Nov 19 '19 07:11 Findus23

@duracelltomi @peterbo would you be able to test this new Google Ads Tag in Matomo Tag Manager? To test you can apply this patch to your Tag Manager: https://patch-diff.githubusercontent.com/raw/matomo-org/tag-manager/pull/50.patch

Or create the 3 new files, and replace plugins/TagManager/lang/en.json by this file: https://raw.githubusercontent.com/matomo-org/tag-manager/8ee55f85b4678f8dd205d92ebca34452bdb24e60/lang/en.json

Be awesome if you can test and confirm if this new tag works for you?

mattab avatar Nov 25 '19 02:11 mattab

I have a super busy week, I can not test this before next week

duracelltomi avatar Nov 25 '19 05:11 duracelltomi

Hi @duracelltomi - Do you think you'd be able to test this PR in the next few days? That would be very helpful to us!

mattab avatar Jan 16 '20 09:01 mattab

I was wondering: What happened to this feature? Would be super helpful I believe (also see https://forum.matomo.org/t/google-ads-tag-in-matomo-tag-manager/40284/2)

maba4891 avatar Oct 13 '21 14:10 maba4891

@maba4891 Noone who knows Google Ads well did yet have time to test it extensively, so it could not yet be merged.

Findus23 avatar Oct 13 '21 15:10 Findus23

Hey, any news dealing with this support ticket, I have a client of mine who would be super interested in having it.

Chardonneaur avatar Sep 02 '22 08:09 Chardonneaur

Hi guys, any news dealing with the integration of this template? there is a high demand about it.

Chardonneaur avatar Mar 27 '23 07:03 Chardonneaur

That's a good question @Chardonneaur . Do we know what happened with this feature @mattab ? This PR looks pretty old and it's set to merge into master instead of the development branch. Should we try to salvage it?

snake14 avatar Mar 27 '23 20:03 snake14

there is a bing ads tracker template, normally, a Google Ads tracker shouldn't be complicated to publish, there are two additional fields I guess.

Chardonneaur avatar Mar 28 '23 10:03 Chardonneaur

Hi, Google Ads tag is ready in this community plugin https://plugins.matomo.org/TagManagerExtended#preview You can copy this template and integrate it into the TagManager?

ronan-hello avatar Feb 13 '24 18:02 ronan-hello

@Stan-vw This would definitely be a good addition, @ronan-hello is there anyway you can send a PR to include this tag ? We would be happy to merge a PR for this feature

AltamashShaikh avatar Feb 14 '24 01:02 AltamashShaikh