title: Fire custom events without using GTM dataLayer in order to activate Google Optimize
body: <p><strong>CONTEXT</strong></p>
  
  <p>I am implementing Google Optimize on an Angular 2 application. I have found numerous resources stating optimize must be triggered on custom events (for example <a href="http://blog.stack.foundation/2017/06/02/using-google-optimize-with-angular/" rel="nofollow noreferrer">http://blog.stack.foundation/2017/06/02/using-google-optimize-with-angular/</a>). </p>
  
  <p>This is because Angular2 needs to first render on the client side before Optimize can apply variations, so page load is not a suitable trigger. This is done through the following snippet:</p>
  
  <pre><code>window['dataLayer'].push({'event': 'optimize.activate'});
  </code></pre>
  
  <p>and specifying <code>Evaluate on custom event: optimize.activate</code> in Google Optimize.</p>
  
  <p><strong>Problem</strong></p>
  
  <p>Datalayer is a Google Tag Manager feature, and currently my website does not, and preferably will not implement Google Tag Manager. Is there an alternative way to fire custom events that does not require GTM? Can I format GA events to activate Optimize instead of GTM dataLayer Events? </p>