Google Analytics Integration: Webhook Error for {{Lead.Marketo Unique Code}} | Community
Skip to main content
Rush
Level 2
January 22, 2020
Solved

Google Analytics Integration: Webhook Error for {{Lead.Marketo Unique Code}}

  • January 22, 2020
  • 4 replies
  • 9781 views

Hi Community,

My company is launching a Google Analytics Integration with our Marketo instance. We are following the guide posted to the Marketo Community found here on Page 5: Seamless Marketo - Google Analytics Integration 

The one snag we've hit is that the new web hook refuses to publish. I receive nothing but the dreaded error message, "url must not contain invalid chars or json". All of the fields are entered correctly, but there appears to be an issue with the "Lead.Marketo Unique Code" field (Token: {{Lead.Marketo Unique Code}} ). I've learned that this is a native field in Marketo, which was originally hidden. I've tried creating the webhook with the field both as hidden as well as unhidden. When I search for the token using the "URL Insert Token" function during creating the webhook, the field can't be found there. Strange enough as it is found when I search for the field within Field Management. 

Screenshot attached.

It appears that both authors of the file have deactivated accounts.

Does anyone have experience with creating a webhook for a Google Analytics integration following this or similar directions? Does anyone know how to override the error message to publish a webhook?

Thanks so much in advance for your help!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

You have an extra non-breaking space here:

{{lead.GA CID}}

It must be:

{{lead.GA CID}}

 

4 replies

Rush
RushAuthor
Level 2
January 22, 2020

Continued onto Page 6 of the documentation there's an additional statement about Google Analytics, of which I don't administer:

"If your Google Analytics configuration do not currently use the User ID feature, you could use the Marketo Lead ID as your user id."

SanfordWhiteman
Level 10
January 22, 2020

Pls remove the attachment and paste the image inline.  Not all users can view attachments (which makes them very confusing).

Level 2
January 17, 2023

I am running into the same issue as Jennifer. This is my first time creating a webhook so no clue what's wrong with it. I am going off some documentation for the GA webhook creation. Any help would be greatly appreciated.

Full URL: 

https://www.google-‐analytics.com/collect?v=1&t=event&tid=UA-24941518-7&cid={{lead.GACID:default=editme}}&ec=marketo&ea=new&el={{Lead.MarketoUniqueCode}}&cd15={{Lead.MarketoUniqueCode}}

 

 

 

SanfordWhiteman
Level 10
January 17, 2023
Surely that's not how those token names are spelled. {{lead.Marketo Unique Code}} has spaces.
Level 2
January 17, 2023

Thanks, Sanford. I updated the tokens and was able to fix the error. It wasn't the tokens but rather the double dash in the URL.

Level 1
April 25, 2023

I am having the same issue and working off the same documentation. Am I supposed to take the spaces out of the tokens?

This is what I'm using when I get the "url must not contain invalid chars or json" error: 


https://www.google-analytics.com/collect?v=1&t=event&tid=UA‐125412578-1&cid={{lead.GA CID}}&ec=marketo&ea=new&el={{Lead.Marketo Unique Code}}&cd1={{Lead.Marketo Unique Code}}

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
April 25, 2023

You have an extra non-breaking space here:

{{lead.GA CID}}

It must be:

{{lead.GA CID}}