dataLayer.push({ });
dataLayer.push javascript snippet is used to push details to Google tag manager. We can create a event and variables required for this/
dataLayer.push({
‘event’:’Scrollview’,
‘pageurl’:titleurl,
‘pagetitle’:title
});
Here we creating an event called “ScrollView” , pageurl and pagetitle are variables we need to push to tag manager.
Using these variable and event we need to configure an event in google tag manager console.