SOLVED

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

Go to solution
Jennifer_Rushal
Level 2

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!

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

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

You have an extra non-breaking space here:

{{lead.GA CID}}

It must be:

{{lead.GA CID}}

 

View solution in original post

8 REPLIES 8
Jennifer_Rushal
Level 2

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

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 - Community Moderator

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

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

NadineRegan
Level 2

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

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

 

 

NadineRegan_0-1673974820927.png

 

Tags (1)
SanfordWhiteman
Level 10 - Community Moderator

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

Surely that's not how those token names are spelled. {{lead.Marketo Unique Code}} has spaces.
NadineRegan
Level 2

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

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.

SanfordWhiteman
Level 10 - Community Moderator

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

Still the {{lead.tokens}} must be spelled correctly. The URL also has a typo, but that's only part of the problem.

dhartland
Level 1

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

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
Level 10 - Community Moderator

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

You have an extra non-breaking space here:

{{lead.GA CID}}

It must be:

{{lead.GA CID}}