/// <summary>
 /// Add google analytics script accessor to Page.
 /// </summary>
 /// <param name="args">The args.</param>
 private void Events_PageRendering(PageRenderingEventArgs args)
 {
     var googleAnalyticsAccessor = new GoogleAnalyticsScriptAccessor(cmsConfiguration, new Guid(ModuleId));
     if (!args.RenderPageData.JavaScripts.Contains(googleAnalyticsAccessor))
     {
         args.RenderPageData.JavaScripts.Add(googleAnalyticsAccessor);
     }
 }
Ejemplo n.º 2
0
 protected bool Equals(GoogleAnalyticsScriptAccessor other)
 {
     return(analyticsScriptGuid.Equals(other.analyticsScriptGuid));
 }
 protected bool Equals(GoogleAnalyticsScriptAccessor other)
 {
     return analyticsScriptGuid.Equals(other.analyticsScriptGuid);
 }