Skip to content

Adapt user_data.adress extraction#10

Open
OphelieMicoine wants to merge 1 commit intolinkedin-developers:mainfrom
OphelieMicoine:main
Open

Adapt user_data.adress extraction#10
OphelieMicoine wants to merge 1 commit intolinkedin-developers:mainfrom
OphelieMicoine:main

Conversation

@OphelieMicoine
Copy link
Copy Markdown

define userAddressData from user_data.address[0] if exist, from user_data.address otherwise.

@OphelieMicoine
Copy link
Copy Markdown
Author

@desaip @wyattr @SurendraJambeLI Hello ! can you consider my pull request please ?

Copy link
Copy Markdown

@ZLeventer ZLeventer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — this is a real bug. The GTM data layer can pass user_data.address as either an array or a plain object depending on the tag configuration, and the current code only handles one format.

I ran into the same issue and took a similar approach in #17. One difference: my PR also adds a fallback for other address subfields (city, region, postal_code, country) using the same array-vs-object check pattern, since those can have the same inconsistency.

Might be worth coordinating to get one merged cleanly — happy to close mine in favor of this one if you expand the fix to cover the other subfields.

@OphelieMicoine
Copy link
Copy Markdown
Author

Thanks for your answer. I will cover the other fields and come back to you as soon as it is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants