runt18 / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Documentation: no mention of how to set up config XML file #826

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
---------------------------------------------------------------------------
NOTE: This tool is not designed to request help. It is only for reporting
issues and requesting features for the Google Analytics libraries.

If you are a developer and you need help, visit:
https://developers.google.com/analytics/help/

If you are not a developer and you need help, visit:
https://support.google.com/analytics
---------------------------------------------------------------------------
Name of affected component: Core Reporting API

Name of related library and version, if applicable (e.g. Java, Python,
HTTP, Objective-C, etc.):

Issue summary:

The docs do not give the complete example code needed to get started. 
Specifically, the XML file used to init a tracker.

Steps to reproduce issue:
1. Go to 
https://developers.google.com/analytics/devguides/collection/android/v4/
2. Follow the instructions.
3. By the end, you will be getting a compile error, because 
"R.xml.global_tracker" is not defined.

Expected output:

I'd expect a section in the docs on how to make the R.xml.global_tracker file.

Actual results:

The R.xml.global_tracker XML file is never mentioned in any of the docs.

Notes:
Provide any additional information which might be useful here. Feel free to
attach screenshots or sample code which demonstrates the issue being
described.

Original issue reported on code.google.com by playthep...@gmail.com on 18 Dec 2015 at 12:54

GoogleCodeExporter commented 8 years ago
I also had met this problem. I use android studio for development. And I put 
'Google Analytics'(which I will call it 'analytics' module later) as an 
independent module for my project.In my main App module,I add a compile 
dependency on another library module called 'third_module',and the 
'third_module' has a compilation dependency on 'analytics' module. But when 
compile, it was reported that the xml.global_tracker cannot be found. It seems 
that the xml.global_tracker is generated in compile time,and inserted to the 
R.java file under the project's package.But when compiled my 'analytics' 
module, the xml.global_tracker  hadn't been generated successfully.

Original comment by john.sha...@oceanwing.com on 19 Dec 2015 at 3:25

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I ran into the same problem and had to resort to changing the 
R.xml.global_tracker to a string containing my tracking code.  

E.g. Tracker mTracker = analytics.newTracker("UA-XXXXXX");

Original comment by james.b...@ubnt.com on 4 Jan 2016 at 10:56

GoogleCodeExporter commented 8 years ago
The same with me, I spent 30 minutes looking for that file. The documentation 
is so flowed. yack yack.

Original comment by codephil...@gmail.com on 23 Jan 2016 at 10:23