Closed (duplicate)
Project:
Google Analytics
Version:
7.x-1.2
Component:
User Interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2011 at 08:45 UTC
Updated:
18 May 2012 at 20:17 UTC
Jump to comment: Most recent file
Comments
Comment #1
hass commentedRTFM next to the input box.
Comment #2
tomas.teicher commentedThanks:)
I got it:)
Comment #4
Nighthawkdark commentedHi!
I have the same problem because my UA code is formatted as UA-xxxxxxx-y and not as UA-xxxxxxx-yy.
Any help will be must appreciated! Thanks!
Comment #5
hass commentedThere is no bug.
Comment #6
didier misson commentedI have exactly the same problem !
The Google Analytics module refuse my UA.
I check in Google Analytics, in the "old interface".
I can check the status of my new site :
So, my UA has a format UA- 8 numbers -1
Drupal give the error message :
Une Identité (ID) de Propriété Web Google Analytics valide est sensible à la casse et est formatée telle que UA-xxxxxxx-aa.My UA is formated UA-xxxxxxxx-n !
I check in the javascript code generated by Google Analytics :
So, my UA is CORRECT but Drupal refuse it ...
UA-xxxxxxx-aa : requested by Drupal (7x-2)
UA-12345678-1 : provided by Google... (8x-1)
Thanks for your help.
;-)
Comment #7
hass commentedComment #8
didier misson commentedThanks Hass ;-)
Where must I put this PHP code ?
Thanks for your help.
Didier
Comment #9
hass commentedThis is the code that is used to verify ga codes for about 3-4 years and is 100% correct. Code wise, there is nothing wrong. There are 180.000 installations without any problem.
You may run a broken php version with preg_match bugs.
Comment #10
didier misson commentedThanks for reply Hass.
Our server is an Ubuntu 11.10 server, with standard LAMP installation.
I have other site and I check : other UA formats are accepted.
Strange...
Comment #11
hass commentedIf you can read the regex you would know that it validates for
UA-followed by 4 or more (up to unlimited) digits, followed by a dash, followed by ONE or more (up to unlimited) digits.Comment #12
Alifbay commentedJust to be sure did you paste the code from Google Analytics? If so, you have to change the two dashes, the copy and paste does not provide the right character.
Comment #13
hass commentedYou have no idea what you are talking about, isn't it? There is nothing to say any more.
Comment #14
lcligny commented@Alifbay thanks for your suggestion, I was trying to copy-paste my GA code from the Google interface since yesterday. Now I changed the dashes to normal ones and it worked perfectly.
The code was of form UA–XXXXXX–Y (wrong) instead of UA-XXXXXX-Y (good).
Comment #15
pverrier commentedHad the same issue ; thanks Alifbay (#12), you're right !
Perhaps it will be useful to automatically replace these dashes by the good ones... I'm probably not the last to copy/paste and be blocked here...
Comment #16
hass commentedDo you have a patch ready? :-)
Comment #17
pverrier commentedHere's a patch to automatically convert ndashes to normal ones.
Comment #18
hass commented#1509610: Invalid dashes in UA–xxxxxxxx–y cannot copied & pasted from Google Analytics website
Comment #19
stephane bouillet commentedThank you #12 Alifbay: just so simple and both complicated ;)