Created
January 11, 2018 15:43
-
-
Save cyberlex404/73a61e2da6427f0194e763ee9ff5adc8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function ($, Drupal, settings) { | |
| "use strict"; | |
| Drupal.behaviors.housingActionContact = { | |
| attach: function (context) { | |
| var button = $(".house-action-phones"); | |
| var housingId = button.data('housing'); | |
| var goalParams = | |
| { | |
| housingId: housingId, | |
| action: 'phones' | |
| }; | |
| function goalCallback () { | |
| console.log(goalParams); | |
| } | |
| button.once('hous-contact-behaviors').on('click', function () { | |
| yaCounter45769347.reachGoal('housing_contact_action', goalParams, goalCallback); | |
| }); | |
| } | |
| }; | |
| Drupal.behaviors.housingActionOrder = { | |
| attach: function (context) { | |
| var button = $(".house-action-order"); | |
| var housingId = button.data('housing'); | |
| var goalParams = | |
| { | |
| housingId: housingId, | |
| action: 'order' | |
| }; | |
| function goalCallback () { | |
| console.log(goalParams); | |
| ga('set', 'dimension1', housingId); | |
| } | |
| button.once('hous-order-behaviors').on('click', function () { | |
| yaCounter45769347.reachGoal('housing_order_action', goalParams, goalCallback); | |
| }); | |
| } | |
| } | |
| })(jQuery, Drupal, drupalSettings); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment