Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix incorrect format for user-properties in request #14

Merged
merged 2 commits into from Oct 24, 2022

Conversation

mm-sam
Copy link
Contributor

@mm-sam mm-sam commented Oct 17, 2022

ref:
https://developers.google.com/analytics/devguides/collection/protocol/ga4/user-properties?client_type=gtag#example_usage

fetch(`https://www.google-analytics.com/mp/collect${queryParams}`, {
    method: "POST",
    body: JSON.stringify({
      "client_id": clientId,
      "user_properties": {
        "customer_tier": {
          "value": customerTier
        }
      },
      "events": JSON.parse(events)
    })
  });

return $userProperty->export();
}, $this->getUserPropertiesList());
return array_reduce($this->getUserPropertiesList(), function ($last, UserProperty $userProperty) {
$last[$userProperty->getName()] = [
Copy link
Owner

Choose a reason for hiding this comment

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

Please use $userProperty->export() instead

@br33f br33f merged commit a5b45f4 into br33f:master Oct 24, 2022
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.

None yet

2 participants