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

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

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.
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
Apr 25, 2023 6:35 PM UTC

You have an extra non-breaking space here:

{{lead.GA CID}}

It must be:

{{lead.GA CID}}

 

8 replies

Level 1
Apr 25, 2023 6:06 PM UTC

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}}

Translate
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
Apr 25, 2023 6:35 PM UTC

You have an extra non-breaking space here:

{{lead.GA CID}}

It must be:

{{lead.GA CID}}

 

Translate
Level 2
Jan 17, 2023 5:02 PM UTC

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}}

 

 

 

Translate
SanfordWhiteman
Level 10
Jan 17, 2023 5:22 PM UTC
Surely that's not how those token names are spelled. {{lead.Marketo Unique Code}} has spaces.
Translate
Level 2
Jan 17, 2023 6:52 PM UTC

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.

Translate
SanfordWhiteman
Level 10
Jan 22, 2020 5:09 PM UTC

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

Translate
Rush
RushAuthor
Level 2
Jan 22, 2020 2:43 PM UTC

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."

Translate