• I have been trying for a couple of days to modify the Google Analytics script to take advantage of new tracking capability. Although the values in “Additional Page Headers” in general settings show the modified script, the change is not there when you “view source” on the actual site. I have deactivated the plugin, cleared cache, cookies, history, re-booted, and every other thing I can think of including deleting the script in the settings and deactivating the plugin. Even with no value in settings the original value is still on the site.

    It acts like a cache issue but I don’t have any cache or similar plugins. Any suggestions? Do I need to delete any temp files stored with the plugin?

    Thanks much for any ideas! Site:: https://www.adalawsuitdefenselawyer.com

    Mike Hodges

    https://www.ads-software.com/plugins/all-in-one-seo-pack/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Steve M

    (@wpsmort)

    Hi Mike,

    The first thing you need to do is remove your Google Analytics UA- number from All in One SEO, General Settings, Google Settings, Google Analytics ID. This will remove the standard tracking code that All in One SEO Pack outputs. One you’ve done that you can add your custom code to the Additional Post Headers, Additional Page Headers and Additional Front Page Headers fields. A better option though would be to add the tracking code to the header.php file in your theme.

    You didn’t say what you were trying to customize in your tracking code. Perhaps we have a setting for what you’re trying to do.

    Thread Starter mlhwebsites

    (@mlhwebsites)

    I thought about changing the header but was concerned this would be wiped out every time theme was updated.

    What I’m trying to change part of the analytics script suggested by analytics to take advantage of new demographics reporting. The change is shown below:

    Original Script:

    ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘https://www’) + ‘.google-analytics.com/ga.js’;

    Modified:

    ga.src = (‘https:’ == document.location.protocol ? ‘https://’ : ‘https://’) + ‘stats.g.doubleclick.net/dc.js’;

    Plugin Support Steve M

    (@wpsmort)

    We have an option for demographics, it’s under All in One SEO, General Settings, Google Settings, Display Advertising Tracking – https://semperplugins.com/documentation/advanced-google-analytics-settings/#displayadvertisingtracking

    Thread Starter mlhwebsites

    (@mlhwebsites)

    Great – I’ve turned that on – Should I keep the tracking code in place – looks fine now? I Put it in all 3 header sections as you recommended.

    The analytics steps are:

    1. Add tracking code
    2. Under property settings (Admin section) set Enable Display Features to ON.

    I just checked my other sites and they are not showing data after 24 hours so there my be a problem with their instructions. I completed 2 also. Sometimes their instructions are a little ambiguous so I could have missed something.

    Thanks again for your supper support!

    Plugin Support Steve M

    (@wpsmort)

    You just need to enter your UA number in All in One SEO, General Settings, Google Settings, Google Analytics ID and enable Display Advertising Tracking. The plugin will do the rest for you. You don’t need to manually add any code anywhere else.

    Thread Starter mlhwebsites

    (@mlhwebsites)

    Ok great – I’ll delete code, remove the ua number – just like your earlier steps to actually remove my code.

    Thanks very much – I really appreciate your help. I’ll let you know if I get the data then.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Changing analytics script’ is closed to new replies.