Streaming live at 10am (PST)

Google Analytics Event Script In Buttons

Hi all!
I’m working with a client to install Google Analytics event tracking on their site.

They would like to track every time a Register button is clicked on their site (directs to a third party booking system) and have provided me with this code:


function gtag_report_conversion(url) {

  var callback = function () {

    if (typeof(url) != 'undefined') {

      window.location = url;



  gtag('event', 'conversion', {

      'send_to': 'AW-1006008591/5vYKCOHAnFcQj_LZ3wM',

      'value': 250.0,

      'currency': 'CAD',

      'event_callback': callback


  return false;



But unsure what to do with this. Looking through the previous forum entires it looks like things get pretty complicated and not seeing anything (that I’ve been able to find) directly related to a script similar to the one above. Any help would be much appreciated!

Here is my public share link:

@Sam_Schwinghamer Hi this is the code i use in the page custom code before /Body. To track button click’s

Hope this can give you a clue.
The tracking is set up in Analytics