How should I process the "meta" array of objects. ...
# ask-questions
a
How should I process the "meta" array of objects. Since GA4 cant process objects? What I've done now is to JSON-stringify it with this code:
Copy code
function() {
  var obj = {{DLV - experiment_results.experiment.meta}};
  return JSON.stringify(obj);
}
Making it show up like so in the debugView
Like so*
@fresh-football-47124 Do you know if you guys have any go to practice for this?
f
I'm a bit confused as to why you're passing this info to GA4?
a
We are passing everything that comes with the API call. What data should we be passing to GA? This is our dL
Copy code
dataLayer.push({
  event: "experiment_results",
  results: [
    {
      experiment: {
        key: "prepaid-description",
        variations: [false, true],
        weights: [0.5, 0.5],
        active: true,
        coverage: 1,
        condition: null,
        namespace: null,
        force: null,
        hashAttribute: "id"
      },
      result: {
        inExperiment: true,
        variationId: 1,
        value: true,
        hashUsed: true,
        hashAttribute: "id",
        hashValue: "9759064.1701950960"
      }
    }
  ],
  eventTimeout: 2000,
  gtm.uniqueEventId: 142
})
f
I'm assuming you're using our SDK, in which case the trackingCallback should be used to track the experiment exposures
There are some examples of this for GA4 in our docs