You can't buy data strength. You build it.
Google made data strength central at GML 2026 and now measures it in Google Ads. But it is not a setting you switch on. Here is what actually builds it.
Mark Rochefort21 Jun 2026
Blog
Adam Englebright29 January 20202 min read

This is part 4 of a semi-regular series, dedicated to reusable GTM solutions for scenarios or issues we’ve encountered more than once.
Last time, we looked at how to turn on-page classic Google Analytics calls to data layer pushes, and this time we'll be looking at a supplement to that—what if the classic GA call you're looking to capture is before GTM loads? This pretty much only matters for ecommerce, so that's what the solution focuses on.
We start by defining some variables:
var gaq = window._gaq;
var ctdl_obj = {};
var ctdl_arr = [];The second two are where we're going to push some values a bit later, and the first one is getting the existing _gaq object.
for(i=0;i < gaq.length;i++){Now we're going to start looping through gaq to see what's in there.
if(gaq[i][0] === "_addTrans"){
window.ctdl_obj.id = gaq[i][1];
window.ctdl_obj.affiliation = gaq[i][2];
window.ctdl_obj.revenue = gaq[i][3];If we find a "_addTrans" which is the push that adds the transaction-level information, we write it into the ctdl_obj we created at the beginning, in Enhanced Ecommerce format.
} else if(gaq[i][0] === "_addItem"){
window.ctdl_arr.push({
'id':gaq[i][2],
'name':gaq[i][3],
'category':gaq[i][4],
'price':gaq[i][5],
'quantity':gaq[i][6]
})Then if it's "_addItem", the pushes which add items (obviously!) we push that into the ctdl_arr array we created earlier.
} else if(gaq[i][0] === "_trackTrans"){
dataLayer.push({
'event': 'hcga_trans',
'ecommerce': {
'purchase':{
'actionField' : window.ctdl_obj,
'products' : window.ctdl_arr
}
}
}
);
}
}Finally, once we hit the "_trackTrans" push, we arrange all the stuff we've gathered into EE format and push it into the data layer.
Once you’ve added this in a custom HTML tag to fire where it's needed, you’ll need to configure a GA tag to fire on the data layer push. The solution is also available in full on the Measurelab Github. Please drop me a line if you’ve got any questions or ideas for improvement!
We investigate and fix collection, tagging and consent problems, with a record of what was tested and what remains uncertain.
An automated first look at collection and consent signals visible on your public site. No account access needed.
Google made data strength central at GML 2026 and now measures it in Google Ads. But it is not a setting you switch on. Here is what actually builds it.
Mark Rochefort21 Jun 2026
AI expert Daniel Hulme, founder of Satalia, shares his journey from UCL PhD to entrepreneur, discussing AI, consciousness & deep tech.
Will Hayes28 Nov 2025
Dara and Matthew chat with Juliana Jackson on her journey, product mindset, and how AI is shaping modern analytics.
Will Hayes13 Nov 2025