<commit_before># Google Analytics Plugin for Unity (beta)
_Copyright (c) 2014 Google Inc. All rights reserved._

The __Google Analytics__ Plugin for Unity allows game developers to easily implement __Google Analytics__ in their Unity games on all platforms, without having to write separate implementations. Note that this is a beta and as such may contains bugs or other issues. Please report them through the Github [issue tracker](https://github.com/googleanalytics/google-analytics-plugin-for-unity/issues) or submit a pull request. The plugin comes with no guarantees.

_Unity is a trademark of Unity Technologies._ This project is not in any way endorsed or supervised by Unity Technologies.

_iOS is a trademark of Apple, Inc._

##Google Analytics V3 Plugin Installation & Set up:

####Before beginning:
 - Set up a __Google Analytics__ app property or use an existing one. Instructions can
   be found [here](https://support.google.com/analytics/answer/2587086?hl=en&ref_topic=2587085).
 - If you want to log transactions or items, make sure you have Ecommerce enabled by following the instructions [here](https://support.google.com/analytics/answer/1009612?hl=en&ref_topic=1037061).

####Set up:
1. <h4>Installation</h4>
Download __googleanalyticsv3.unitypackage__ from our [github page](https://github.com/googleanalytics/google-analytics-plugin-for-unity/raw/master/googleanalyticsV3.unitypackage) and import it into your Unity project by double clicking it .
2. <h4>Platform specific configuration</h4>
&nbsp;&nbsp;&nbsp;&nbsp;__[Android Only]__
  * If your project does not already have a file called _AndroidManifest.xml_ in _&#60;YOUR PROJECT ROOT>/Assets/Plugins/Android/_,  build the project for Android and then copy the _AndroidManifest.xml_ from the _Temp/StagingArea/_ directory (it will be under the directory you chose to build in). Paste it into _&#60;YOUR PROJECT ROOT>/Assets/Plugins/Android/_
  * Add the following permissions to the _AndroidManifest.xml_ in _&#60;YOUR PROJECT ROOT>/Assets/Plugins/Android/_ above the &#60;application> tag:
	```
	<uses-permission android:name="android.permission.INTERNET"/>
	
	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
	```
  * If you want to do campaign tracking, add the following service as well:
	```
	<service android:name="com.google.analytics.tracking.android.CampaignTrackingService" />
	
	<receiver android:name="com.google.analytics.tracking.android.CampaignTrackingReceiver" android:exported="true" >
	
	  <intent-filter>
	  
	    <action android:name="com.android.vending.INSTALL_REFERRER" />
	    
	  </intent-filter>
	  
	</receiver>
```
__[iOS Only]__
 	* When building for iOS, you will need to add the following libraries to your Xcode project:
    	* AdSupport.framework
    	* CoreData.framework
    	* SystemConfiguration.framework
    	* libz.dylib
    	* libsqlite3.dylib
 	* If you would like the libraries to be automatically added when building for iOS, copy the file _PostProcessBuildPlayer_GA_ from the _iOS Extras_ folder and put it in the _&#60;YOUR PROJECT ROOT>/Assets/Editor_ folder.
 	* Next, get the mod_pbxproj.py script available [here](https://github.com/kronenthaler/mod-pbxproj) and copy it into the Editor directory as well. The libraries will now be added automatically during the build. 
4. <h4>Configure the GAv3 prefab</h4>
Click on the prefab object called __GAv3.prefab__ which you can find in _Assets/Plugins/GoogleAnalyticsV3_ in the _Project_ view. The _Inspector_ view on the right will now display a Script component attached to the prefab with several properties underneath. 
5. Populate these fields with the correct values for your project. This will populate the object so you can use it everywhere in your project. 
 	* _Note that you can use the same property ID for all platforms._ 
 	* Sample values: <br>
	<code>Android Property ID: UA-XXXXXXX-1</code>
		<br>
	<code>iOS Property ID: UA-XXXXXXX-2</code>
		<br><commit_msg>Add note about new library<commit_after># Google Analytics Plugin for Unity (beta)
_Copyright (c) 2014 Google Inc. All rights reserved._

The __Google Analytics__ Plugin for Unity allows game developers to easily implement __Google Analytics__ in their Unity games on all platforms, without having to write separate implementations. Note that this is a beta and as such may contains bugs or other issues. Please report them through the Github [issue tracker](https://github.com/googleanalytics/google-analytics-plugin-for-unity/issues) or submit a pull request. The plugin comes with no guarantees.

_Unity is a trademark of Unity Technologies._ This project is not in any way endorsed or supervised by Unity Technologies.

_iOS is a trademark of Apple, Inc._

##Google Analytics V3 Plugin Installation & Set up:

####Before beginning:
 - Set up a __Google Analytics__ app property or use an existing one. Instructions can
   be found [here](https://support.google.com/analytics/answer/2587086?hl=en&ref_topic=2587085).
 - If you want to log transactions or items, make sure you have Ecommerce enabled by following the instructions [here](https://support.google.com/analytics/answer/1009612?hl=en&ref_topic=1037061).

####Set up:
1. <h4>Installation</h4>
Download __googleanalyticsv3.unitypackage__ from our [github page](https://github.com/googleanalytics/google-analytics-plugin-for-unity/raw/master/googleanalyticsV3.unitypackage) and import it into your Unity project by double clicking it .
2. <h4>Platform specific configuration</h4>
&nbsp;&nbsp;&nbsp;&nbsp;__[Android Only]__
  * If your project does not already have a file called _AndroidManifest.xml_ in _&#60;YOUR PROJECT ROOT>/Assets/Plugins/Android/_,  build the project for Android and then copy the _AndroidManifest.xml_ from the _Temp/StagingArea/_ directory (it will be under the directory you chose to build in). Paste it into _&#60;YOUR PROJECT ROOT>/Assets/Plugins/Android/_
  * Add the following permissions to the _AndroidManifest.xml_ in _&#60;YOUR PROJECT ROOT>/Assets/Plugins/Android/_ above the &#60;application> tag:
	```
	<uses-permission android:name="android.permission.INTERNET"/>
	
	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
	```
  * If you want to do campaign tracking, add the following service as well:
	```
	<service android:name="com.google.analytics.tracking.android.CampaignTrackingService" />
	
	<receiver android:name="com.google.analytics.tracking.android.CampaignTrackingReceiver" android:exported="true" >
	
	  <intent-filter>
	  
	    <action android:name="com.android.vending.INSTALL_REFERRER" />
	    
	  </intent-filter>
	  
	</receiver>
```
__[iOS Only]__
 	* When building for iOS, you will need to add the following libraries to your Xcode project:
    	* AdSupport.framework
    	* CoreData.framework
    	* SystemConfiguration.framework
    	* libz.dylib
    	* libsqlite3.dylib
 	* If you would like the libraries to be automatically added when building for iOS, copy the file _PostProcessBuildPlayer_GA_ from the _iOS Extras_ folder and put it in the _&#60;YOUR PROJECT ROOT>/Assets/Editor_ folder.
 	* Next, get the mod_pbxproj.py script available [here](https://github.com/kronenthaler/mod-pbxproj) and copy it into the Editor directory as well. The libraries will now be added automatically during the build. 
 	* _Note: 'libsqlite3.dylib' is only required if using the '-ObjC' linker flag in Xcode and can be safely removed from the PostProcessBuildPlayer_GA file if you are not using this flag._
4. <h4>Configure the GAv3 prefab</h4>
Click on the prefab object called __GAv3.prefab__ which you can find in _Assets/Plugins/GoogleAnalyticsV3_ in the _Project_ view. The _Inspector_ view on the right will now display a Script component attached to the prefab with several properties underneath. 
5. Populate these fields with the correct values for your project. This will populate the object so you can use it everywhere in your project. 
 	* _Note that you can use the same property ID for all platforms._ 
 	* Sample values: <br>
	<code>Android Property ID: UA-XXXXXXX-1</code>
		<br>
	<code>iOS Property ID: UA-XXXXXXX-2</code>
		<br>
{'fraction_non_alphanumeric': 0.08203556100551809, 'fraction_numerical': 0.015082771305947271, 'mean_word_length': 4.687587168758717, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 55, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2663949', 'n_tokens_mistral': 2471, 'n_tokens_neox': 2289, 'n_words': 904}