This message was deleted.
# ask-questions
w
This message was deleted.
r
Hi there! I understand you want to add brand as a custom attribute. Here is an example:
Copy code
<script>
window.growthbook­_config = window.growthbook­_config || {};
window.growthbook­_config.attributes = {
    brand: "xyz",
    otherCustomAttribute: 12,
}
</script>
You'll want to add this before the other GrowthBook code. Learn more in the docs: https://docs.growthbook.io/lib/script-tag#adding-custom-attributes
c
Hi Ryan I thought the existing values in the datalayer were immediately available for use "In addition, if you use Google Tag Manager, any variables you set in your Data Layer will also be set here and available for targeting." https://docs.growthbook.io/lib/script-tag#targeting-attributes
Trying avoid additional dev costs. Seemed to track (in my mind at least) that if growthbook could automatically pass the experiment id to the datalayer that it could also pull data from the datalayer as well??
r
Gotcha! I looked at the code on your site and how our code works. It looks like brand is part of a custom event in GA, but we strip out custom events, which is why you aren't seeing it. Currently, then, you'd need to add that data in a different way in your app, as it won't be included automatically. How are you constructing that event for GA?
120 Views