How to generate sessionAttributesEncoded for ClickConversion uploads?

17 views
Skip to first unread message

Pradip Poudel

unread,
Nov 4, 2025, 6:50:13 PMNov 4
to Google Ads API and AdWords API Forum

Hi Google Ads API Team,

I’m working on integrating the Google Ads API (v20) for offline conversion uploads and wanted clarification on how to generate the session_attributes_encoded value.

According to the documentation, the field

conversion[].sessionAttributesEncoded — bytes
“The session attributes for the event, represented as a base64-encoded JSON string. The content should be generated by a Google-provided library.”

However, I haven’t found any public documentation or JavaScript methods in gtag.js or Tag Manager that generate this encoded session token.

Thanks in advance for clarifying the expected approach.

Google Ads API Forum Advisor

unread,
Nov 5, 2025, 2:05:39 AMNov 5
to pra...@fundo.com.au, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

I understand your query regarding the generation of the session_attributes_encoded value. There are two methods to import session attributes: either by providing the encoded token generated by our JavaScript code within the browser or by supplying individual key-value pairs for each identifier. The session attributes for the event are represented as a base64-encoded JSON string, and this content should be generated by a Google-provided library. I recommend referring to the guide on session_attributes for further details. 

Additionally, for more comprehensive information and guidance on capturing session attributes, please refer to the help center article About session_attributes.

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-11-05 07:04:46Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vShVj:ref" (ADR-00338498)



Reply all
Reply to author
Forward
0 new messages