Skip to content

Instantly share code, notes, and snippets.

@Acen
Last active Jul 1, 2018
Embed
What would you like to do?
Example Google Analytics Dimensions
Sending this data on every page view:
<script type="text/javascript">
ga('set', 'company_id', '{{ $company['company_id'] }}');
ga('set', 'monthly_spend', '{{ $company['monthly_spend'] }}');
ga('set', 'plan_name', '{{ $company['plan_name'] }}');
ga('set', 'renewal_date', '{{ $company['renewal_date'] }}');
ga('send', 'pageview');
</script>
OnRegistration:
ga('send', 'event', 'user_registration', 'plan_status', {
'company_id': {{ $company['company_id'] }}',
'monthly_spend': '{{ $company['monthly_spend'] }}',
'plan_name': '{{ $company['plan_name'] }}',
'registration_date': '{{ $comapny['registration_date'] }}'
'renewal_date': '{{ $company['renewal_date'] }}',
'subscription_date': '{{ $company['subscription_date'] }}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment