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

Add specified user properties to event models #320

Open
adamribaudo-velir opened this issue Apr 29, 2024 · 0 comments
Open

Add specified user properties to event models #320

adamribaudo-velir opened this issue Apr 29, 2024 · 0 comments

Comments

@adamribaudo-velir
Copy link
Collaborator

adamribaudo-velir commented Apr 29, 2024

We allow users to list out specific user properties which are then added to this model: https://github.com/Velir/dbt-ga4/blob/main/models/staging/stg_ga4__user_properties.sql

However, it would be useful and inexpensive to include these user properties in all event models.

We perform a similar operation with custom event properties which are defined in the project.yml and then included in the event models with this code block:

 {% if var("default_custom_parameters", "none") != "none" %}
        {{ ga4.stage_custom_parameters( var("default_custom_parameters") )}}
      {% endif %}

Which uses this macro: https://github.com/Velir/dbt-ga4/blob/main/macros/stage_custom_parameters.sql

A similar 'stag user properties' macro could be created to accomplish the same thing for user properties.

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

No branches or pull requests

1 participant