Skip to content

Commit

Permalink
Adding ga code.
Browse files Browse the repository at this point in the history
  • Loading branch information
calebfavor committed Mar 30, 2017
1 parent 2b28dde commit b055d01
Showing 1 changed file with 90 additions and 0 deletions.
90 changes: 90 additions & 0 deletions src/TrackingProviders/GoogleAnalyticsTrackingProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,95 @@

class GoogleAnalyticsTrackingProvider
{
public static function getHeadTopTrackingCode()
{

}

public static function getHeadBottomTrackingCode()
{

}

public static function getBodyTopTrackingCode()
{

}

public static function getBodyBottomTrackingCode()
{
$trackingId = config('railanalytics.providers.google-analytics.tracking-id');

echo
"
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '" . $trackingId . "', 'auto');
ga('send', 'pageview');
</script>
";
}

public static function trackBase($trackGroupName)
{

}

public static function trackProductImpression(
$trackGroupName,
$id,
$name,
$category,
$value,
$currency = null
) {

}

public static function trackProductDetailsImpression(
$trackGroupName,
$id,
$name,
$category,
$value,
$currency = null
) {

}

public static function trackAddToCart(
$trackGroupName,
$id,
$name,
$category,
$value,
$quantity,
$currency = null
) {

}

public static function trackInitiateCheckout()
{

}

public static function trackAddPaymentInformation()
{

}

public static function trackTransaction()
{

}

public static function trackRegistration()
{

}
}

0 comments on commit b055d01

Please sign in to comment.