You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Put all custom fields in the data query parameter automatically #1
We would like to send custom fields set in the Zaraz remarketing tool interface to Google Ads and are wondering wether payload.data is the variable holding the custom fields content:
Is this correct? Is this line the part where the custom fields get merged in the parameters?
We are expecting to see custom field data set as parameters in Google ads in the segment creation section in Audiences as follows:
For some reason we do not receive the custom field value as a custom parameter to use in creating custom segment in Google Ads. What could be the reason? Could you give an example of how the URL looks like with custom fields?
Hey @tgowing ! Indeed this is the line that all the additional parameters are being added.
I can't really comment on the Google Ads side of things as I do not know how that works. You should be able to see the request URL if you use the Zaraz Debugger. The path to solving this issue probably starts with trying out the original Google Ads implementation and seeing how their URL looks like when adding parameters. This was we can compare and see if and what is missing on our side.
@bjesus Thanks very much. I discovered that the current code allows us to send the custom parameters correctly. Google ads expects the custom parameters to be sent in the data paramater of the request.
So when setting a Custom field in the CF interface it will just be appended to the request. So it will look like this:
Activity
bjesus commentedon May 16, 2023
Hey @tgowing ! Indeed this is the line that all the additional parameters are being added.
I can't really comment on the Google Ads side of things as I do not know how that works. You should be able to see the request URL if you use the Zaraz Debugger. The path to solving this issue probably starts with trying out the original Google Ads implementation and seeing how their URL looks like when adding parameters. This was we can compare and see if and what is missing on our side.
tgowing commentedon May 17, 2023
@bjesus Thanks very much. I discovered that the current code allows us to send the custom parameters correctly. Google ads expects the custom parameters to be sent in the data paramater of the request.
So when setting a Custom field in the CF interface it will just be appended to the request. So it will look like this:
Instead it should look like this:
I was able to make this change via CF interface custom fields settings and now it works as it should.
In the Cloudflare UI we don't have to encode the
datafield value, so it will be like this:kuba-orlik commentedon Sep 1, 2023
Glad you've found a manual way to do this! We are considering native support for custom fields in this component in the future. PRs are welcome 😉
[-]Question about the custom fields[/-][+]Put all custom fields in the `data` query parameter automatically[/+]