1

I am currently using google analytics module in drupal however when i check With Tag assist extension is shows that i am making two calls to google analytics using the same analytics key. I check my inspector and look for analytics.js and it does appear twice.

once in:

<!--//--><![CDATA[//><!--
(function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,"script","http://dev-website.pantheonsite.io/sites/default/files/googleanalytics/analytics.js?oebw5p","ga");ga("create", "UA-213XXXX-X", {"cookieDomain":"auto"});ga("require", "linkid", "linkid.js");ga("send", "pageview");
//--><!]]>

I have no idea where that is being called from and then again in:

(Drupal.settings, {"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"test-site","theme_token":"XXXXXXXXXXXXXXXX-y-oO0","js":{"sites\/all\/libraries\/modernizr\/modernizr.js":1,"sites\/all\/libraries\/underscore\/underscore-min.js":1,"sites\/all\/themes\/test-site\/webfonts\/ss-social.js":1,"sites\/all\/themes\/test-site\/webfonts\/ss-symbolicons.js":1,"sites\/all\/themes\/test-site\/webfonts\/ss-standard.js":1,"sites\/all\/themes\/test-site\/js\/jquery\/plugins.js":1,"sites\/all\/themes\/test-site\/js\/jquery\/app.js":1,"sites\/all\/themes\/test-site\/js\/jquery\/test-site-drupal-custom.js":1,"sites\/all\/themes\/test-site\/js\/picturefill.min.js":1,"0":1,"\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.11.2\/jquery.min.js":1,"1":1,"misc\/jquery.once.js":1,"misc\/drupal.js":1,"sites\/all\/modules\/contrib\/jquery_update\/replace\/ui\/external\/jquery.cookie.js":1,"sites\/all\/libraries\/colorbox\/jquery.colorbox-min.js":1,"sites\/all\/modules\/contrib\/colorbox\/js\/colorbox.js":1,"sites\/all\/modules\/contrib\/colorbox\/styles\/default\/colorbox_style.js":1,"sites\/all\/modules\/contrib\/themekey\/themekey_redirect\/themekey_redirect.js":1,"sites\/all\/modules\/contrib\/google_analytics\/googleanalytics.js":1,"2":1,"misc\/autocomplete.js":1,"sites\/all\/modules\/contrib\/search_api_autocomplete\/search_api_autocomplete.js":1,"3":1,"http:\/\/w.sharethis.com\/button\/buttons.js":1,"4":1,"sites\/all\/modules\/contrib\/field_group\/field_group.js":1,"\/sites\/all\/libraries\/jquery\/jquery-ui.min.js":1,"\/\/maxcdn.bootstrapcdn.com\/bootstrap\/3.3.4\/js\/bootstrap.min.js":1,"\/\/use.typekit.net\/hhy3ulu.js":1,"sites\/all\/themes\/basic\/js\/build\/scripts.js":1,"sites\/all\/themes\/basic\/js\/build\/modernizr.js":1},"css":{"modules\/system\/system.base.css":1,"modules\/system\/system.menus.css":1,"modules\/system\/system.messages.css":1,"modules\/system\/system.theme.css":1,"sites\/all\/modules\/contrib\/calendar\/css\/calendar_multiday.css":1,"modules\/comment\/comment.css":1,"sites\/all\/modules\/contrib\/date\/date_api\/date.css":1,"sites\/all\/modules\/contrib\/date\/date_popup\/themes\/datepicker.1.7.css":1,"sites\/all\/modules\/contrib\/date\/date_repeat_field\/date_repeat_field.css":1,"modules\/field\/theme\/field.css":1,"modules\/node\/node.css":1,"sites\/all\/modules\/contrib\/payment_forms\/payment_forms.css":1,"modules\/search\/search.css":1,"modules\/user\/user.css":1,"sites\/all\/modules\/contrib\/webform_paymethod_select\/webform_paymethod_select.css":1,"sites\/all\/modules\/contrib\/workflow\/workflow_admin_ui\/workflow_admin_ui.css":1,"sites\/all\/modules\/contrib\/views\/css\/views.css":1,"sites\/all\/modules\/contrib\/ckeditor\/css\/ckeditor.css":1,"sites\/all\/themes\/basic\/css\/tabs.css":1,"sites\/all\/modules\/contrib\/colorbox\/styles\/default\/colorbox_style.css":1,"sites\/all\/modules\/contrib\/ctools\/css\/ctools.css":1,"sites\/all\/modules\/contrib\/facebook_pull\/facebook_pull.css":1,"sites\/all\/modules\/contrib\/panels\/css\/panels.css":1,"sites\/all\/modules\/contrib\/search_api_autocomplete\/search_api_autocomplete.css":1,"sites\/all\/modules\/contrib\/field_group\/field_group.css":1,"sites\/all\/themes\/test-site\/webfonts\/ss-social-regular.css":1,"sites\/all\/themes\/test-site\/webfonts\/ss-symbolicons-block.css":1,"sites\/all\/themes\/test-site\/webfonts\/ss-standard.css":1,"\/\/ajax.googleapis.com\/ajax\/libs\/jqueryui\/1.10.4\/themes\/ui-lightness\/jquery-ui.css":1,"sites\/all\/themes\/test-site\/css\/test-site-app.css":1,"sites\/all\/themes\/test-site\/css\/test-site-drupal-custom.css":1}},"colorbox":{"opacity":"0.85","current":"{current} of {total}","previous":"\u00ab Prev","next":"Next \u00bb","close":"Close","maxWidth":"98%","maxHeight":"98%","fixed":true,"mobiledetect":true,"mobiledevicewidth":"480px"},"ThemeKeyRedirect":{"checkOnce":false,"redirectOnce":false},"googleanalytics":{"trackOutbound":1,"trackMailto":1,"trackDownload":1,"trackDownloadExtensions":"7z|aac|arc|arj|asf|asx|avi|bin|csv|doc(x|m)?|dot(x|m)?|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt(x|m)?|pot(x|m)?|pps(x|m)?|ppam|sld(x|m)?|thmx|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls(x|m|b)?|xlt(x|m)|xlam|xml|z|zip"},"urlIsAjaxTrusted":{"\/":true},"field_group":{"div":"full"}});

Which most likely being called from the googleanalytics module. I tried removing the source script and directory for the first call but both the script and file were created again.

can anyone help me identify what is creating the first call to analytics.js?

1

The first instance was being created by Google Tag Manager module. Since this module uses a different type of key than the Google Analytics module I didnt think it was adding the additional analytics.js

|improve this answer|||||

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.