<?xml version="1.0"?>
<package>
    <name>RJMetrics_Campaigns</name>
    <version>1.0.0.2</version>
    <stability>stable</stability>
    <license uri="http://opensource.org/licenses/apachepl.php">ASL</license>
    <channel>community</channel>
    <extends/>
    <summary>Captures visitor source information from the Google Analytics cookie and stores it to the Magento database.</summary>
    <description>&lt;p&gt;Perform in-dept analysis on your referral sources and see which channels bring in the most valuable users. This tool captures visitor source information from the Google Analytics cookie and stores it to your Magento database.&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Once you install the Acquisition Source Grabber, a set of new data fields will be available in your Magento database. Each of your new users will then have corresponding acquisition source data, and each new order will have corresponding referral source data. Essentially, you will be able to segment users and orders by GA referral sources (please also see this article on GA source data terminologies).&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&lt;strong&gt;Order Referral Source Data&lt;/strong&gt;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;An order's referral source data corresponds to the web location that a user visited prior to a specific purchase. For example, the same user may have found your product via Google Search this time and an Advertisement the next time, so this value is specific to the purchase and may differ for a single user over time.&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Orders have their corresponding referral data stored in the following data table and columns:&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li /&gt;`sales_flat_order`.`rjm_utm_source`&#xD;
&lt;li /&gt;`sales_flat_order`.`rjm_utm_medium`&#xD;
&lt;li /&gt;`sales_flat_order`.`rjm_utm_term`&#xD;
&lt;li /&gt;`sales_flat_order`.`rjm_utm_content`&#xD;
&lt;li /&gt;`sales_flat_order`.`rjm_utm_campaign`&#xD;
&lt;/ul&gt;&#xD;
&#xD;
&lt;p&gt;&lt;strong&gt;User Acquisition Source Data&lt;/strong&gt;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;A user's acquisition source data corresponds to the web location from which the user visited your site the first time.&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Users will have their corresponding acquisition source data stored in the `customer_entity_varchar`.`value` table and column. Since the `customer_entity_varchar` table is an EAV type table, a specific `customer_entity_varchar`.`attribute_id` is needed to identify a specific utm field.&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;You can find the exact `attribute_id` values in the `eav_attribute` table by running the following query, which returns the exact `attribute_id` and corresponding user acquisition utm field:&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;SELECT `attribute_id`, `attribute_code` FROM `eav_attribute` WHERE `attribute_code` like 'rjm_utm%'&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Here are the five user acquisition utm fields (`attribute_code`) that you will find:&lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li /&gt;`rjm_utm_source`&#xD;
&lt;li /&gt;`rjm_utm_medium`&#xD;
&lt;li /&gt;`rjm_utm_term`&#xD;
&lt;li /&gt;`rjm_utm_content`&#xD;
&lt;li /&gt;`rjm_utm_campaign`&#xD;
&lt;/ul&gt;&#xD;
&#xD;
&lt;p&gt;For example, you may find that the `attribute_id` for `rjm_utm_source` may be a number such as 997. If that is the case, then you can query a user's corresponding acquisition utm_source with the following query which returns a user's utm_source and entity_id values:&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;SELECT cev.`value`, ce.`entity_id` FROM `customer_entity` ce JOIN `customer_entity_varchar` cev ON ce.`entity_id`=cev.`entity_id` WHERE `attribute_id`=997 LIMIT 100&lt;/p&gt;</description>
    <notes>Fixes issue where acquisition source was not updating.</notes>
    <authors><author><name>rjmetrics</name><user>rjmetrics</user><email>thandy@rjmetrics.com</email></author></authors>
    <date>2013-08-05</date>
    <time>19:24:31</time>
    <contents><target name="magecommunity"><dir name="RJMetrics"><dir name="Campaigns"><file name="LICENSE.txt" hash="07b715ee32a1b9ec413fec5c37c07ca2"/><dir name="Model"><file name="Observer.php" hash="a1b31a3aa6511e77eaef1e98a1116037"/><dir name="Resource"><file name="Setup.php" hash="24db4af99aa3d7cf30e48dff3cf70c90"/></dir></dir><dir name="etc"><file name="config.xml" hash="121970340ca969df55198d35a3d8887e"/><file name="wsdl.xml" hash="72c7dda48c7753216545f46d93b4dfac"/></dir><dir name="sql"><dir name="rjmetrics_campaigns_setup"><file name="install-1.0.0.0.php" hash="61e8c5f6cae83e47594afe192d186a10"/><file name="mysql4-install-1.0.0.0.php" hash="8398e4368cb7992f0a75c2e52131d5ec"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="RJMetrics_Campaigns.xml" hash="00949deebd5fde3680ff55176a91c474"/></dir></target></contents>
    <compatible/>
    <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
</package>
