1

I am working on tag certain events with google tag manager but I have a doubt about sending custom value, I'm defined an event like this

enter image description here

In the value field I'm sending a data layer value defined as monthly_income so in javascript I set the event like this

<button  name="calculate-by-monthly-income" class="btn btn-primary tab" ng- click="calculateByMonthlyIncome()" ng-disabled="myForm.$invalid" onclick="dataLayer.push({'monthly_income': '10000'});ga('send', 'event', 'Calculadora1', 'Calcular', 'Event');">
   Calcular
</button>

I'm not sure if it is the right way to set the value field

regards

  • You would need to also push an "event" into the dataLayer so that you can use that to acquire the monthly_income value. Without it, it would very difficult for you to get the monthly_income because you wouldn't know which dataLayer object to fetch the value from. – nyuen Jan 6 '16 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.