package com.pixable.pixalytics.google_analytics.platform;

import com.pixable.pixalytics.core.platform.Platform;
import com.pixable.pixalytics.google_analytics.proxy.GoogleAnalyticsProxy;
import com.pixable.pixalytics.google_analytics.R;

import java.util.Map;

public class GoogleAnalyticsPlatform extends Platform {

    public GoogleAnalyticsPlatform(String id, Config config) {
        super(id, R.drawable.pixalytics__tracking_toast_google_analytics, new GoogleAnalyticsProxy(config));
    }

    /**
     * Configuration parameters for a tracking platform. For instance, a project in your Mixpanel
     * account.
     */
    public static class Config extends Platform.Config {
        Map<String, Integer> dimensionsMapping;
        Map<String, Integer>  metricsMapping;

        public Config(String appKey, Map<String, Integer> dimensionsMapping, Map<String, Integer> metricsMapping) {
            super(appKey);
            this.dimensionsMapping = dimensionsMapping;
            this.metricsMapping = metricsMapping;
        }

        public Map<String, Integer> getDimensionsMapping() {
            return dimensionsMapping;
        }

        public Map<String, Integer> getMetricsMapping() {
            return metricsMapping;
        }
    }
}

@@ -592,32 +592,449 @@
 our 
-Mixpanel%0A     * account.
+Google Analytics%0A     * account.%0A     * This configuration consists in:%0A     * - appKey: Google Analytics Project Id (like 'UA-XXXXXXXX-1')%0A     * - dimensionsMapping: Mapping of dimensions defined in Google Analytics Admin page to match Properties name and Dimensions Id%0A     *   Example: (%7B'view', 1%7D,%7B'user', 2%7D...)%0A     * - metricsMapping: Mapping of metrics defined in Google Analytics Admin page to match Properties name and Metrics Id
 %0A   

Add little documentation about Google Analytics Config