1. Is it possible in GrowthBook to target experime...
# ask-questions
c
2. Is it possible in GrowthBook to target experiments based on dataLayer variables that exist before GrowthBook is loaded?
f
yes, the attributes you use for targeting are completely customizable
the data evaluations are done on the SDK, and any data you set can be used
c
👍
Should I pass dataLayer variables on which I want to target to GrowthBook as attributes during initialization GB like
Copy code
attributes: {
    clientId: clientId,
    userId: userId,
    country: "US",
    variables from dataLayer
  }
or GrowthBook recognise dataLayer automatically and can use these variables for targeting?
f
How it works on the data side, is that we pull the assignment information and then join it to all the other information, based on the randomization unit (typically a user or anon id). you can pass that info if you like, but its not required - and it might already be there in the exposure event