diff --git a/wordpress/wp-content/plugins/idcommerce/js/idcommerce.js b/wordpress/wp-content/plugins/idcommerce/js/idcommerce.js index f6eb3944d1c9b26d159de0b1f8b494b797ed49bd..fab5e6f436c5baf4790194f6ac5c266a7881f548 100644 --- a/wordpress/wp-content/plugins/idcommerce/js/idcommerce.js +++ b/wordpress/wp-content/plugins/idcommerce/js/idcommerce.js @@ -579,6 +579,33 @@ jQuery(document).ready(function() { check_email(); } }); + + function trackPurchase(orderID, product, price) { + var level = jQuery("input#payment_level").val(); + + // Add Transaction Data + ga('ecommerce:addTransaction', { + 'id': orderID.toString(), + 'revenue': price.toString(), + }); + + // Add Item Data + ga('ecommerce:addItem', { + 'id': orderID.toString(), + 'name': product.toString(), + 'price': price.toString(), + }); + + ga('ecommerce:send'); + ga('send', 'event', 'Project Contribution', 'Donation Complete', ''); + + fbq('track', 'Purchase', { + value: parseFloat(price), + currency: 'USD', + content_name: product.toString(), + }); + } + function processFree() { var fname = jQuery(".first-name").val(); var lname = jQuery(".last-name").val(); @@ -679,18 +706,8 @@ jQuery(document).ready(function() { var type = json.type; var custID = json.customer_id; jQuery(document).trigger('stripeSuccess', [orderID, custID, userID, product, paykey, fields, type]); - // Code for Custom Goal: Sale - //_vis_opt_goal_conversion(201); - //_vis_opt_goal_conversion(202); - // set a timeout for 1 sec to allow trigger time to fire - ga('send', 'event', 'Project Contribution', 'Donation Complete', ''); - ga('ecommerce:addTransaction', { - 'id': orderID.toString(), - 'affiliation': product.toString(), - 'revenue': pwywPrice.toString(), - }); - ga('ecommerce:send'); + trackPurchase(orderID, product, pwywPrice); setTimeout(function() { window.location = memberdeck_durl + permalink_prefix + "idc_product=" + product + "&paykey=" + paykey + queryString; @@ -878,6 +895,9 @@ jQuery(document).ready(function() { //_vis_opt_goal_conversion(201); //_vis_opt_goal_conversion(202); // set a timeout for 1 sec to allow trigger time to fire + + trackPurchase(orderID, product, pwywPrice); + setTimeout(function() { window.location = memberdeck_durl + permalink_prefix + "idc_product=" + product + "&paykey=" + paykey + queryString; }, 1000); diff --git a/wordpress/wp-content/plugins/idcommerce/templates/_checkoutForm.php b/wordpress/wp-content/plugins/idcommerce/templates/_checkoutForm.php index e56aa00596d3f1ef4fc1be9669c14c99b57b1984..08546c6ce34a4fd7e0445b6aa01869fecf1b6ff5 100644 --- a/wordpress/wp-content/plugins/idcommerce/templates/_checkoutForm.php +++ b/wordpress/wp-content/plugins/idcommerce/templates/_checkoutForm.php @@ -82,7 +82,7 @@ - + @@ -134,7 +134,7 @@
- + post_title; ?> & post_title; ?>
@@ -179,7 +179,7 @@
- - + - + diff --git a/wordpress/wp-content/themes/backer/header-projectsingle.php b/wordpress/wp-content/themes/backer/header-projectsingle.php index 3cc5d38c3c7dfe2ee80adfd6d385eebf047cdb18..d42e470bef6e52788ff59910278ab308822fe8b8 100644 --- a/wordpress/wp-content/themes/backer/header-projectsingle.php +++ b/wordpress/wp-content/themes/backer/header-projectsingle.php @@ -40,13 +40,25 @@ - - - + + + + + + + @@ -59,15 +71,7 @@ nav:true, items: 1, autoplay:true, - - }); - $('a').click(function() { - mixpanel.track("Page View"); - // put the code you want to add to all the onclicks here - // "this" refers to the anchor tag, like this.href gets you - // the location the link goes to. - // make your code return true to let the click happen - // return false to stop the click + }); $( '#sidebar' ).wrap( '' ); @@ -79,11 +83,11 @@ elemTop = $(elem).offset().top; return ((elemTop <= docViewTop)); } - + var sticky = $('#sidebar'); var stopper = $('.sticky-stop'); var catcher = $('#main-content'); - + $('body').scroll(function() { if(isScrolledTo(catcher)) { catcher.addClass('sticky'); @@ -111,7 +115,7 @@
- - +
@@ -164,4 +168,3 @@ - \ No newline at end of file diff --git a/wordpress/wp-content/themes/backer/header.php b/wordpress/wp-content/themes/backer/header.php index 69d63992c072f8346cd7297c29696c3addb576ed..5b3b452108e73c60e059ba8572435b03aa91dd64 100644 --- a/wordpress/wp-content/themes/backer/header.php +++ b/wordpress/wp-content/themes/backer/header.php @@ -28,42 +28,25 @@ - - - - - - - - - - + + + + + + + @@ -77,7 +60,7 @@ src="https://www.facebook.com/tr?id=1980302352204881&ev=PageView&noscript=1"
- - +
diff --git a/wordpress/wp-content/themes/backer/includes/ignitiondeck-templates/_checkoutForm.php b/wordpress/wp-content/themes/backer/includes/ignitiondeck-templates/_checkoutForm.php index dfa63ca6cff8d8aa02732923d0c885a7ec6a8b00..de3808c62512d981f6f8c348015e30734e17d59e 100644 --- a/wordpress/wp-content/themes/backer/includes/ignitiondeck-templates/_checkoutForm.php +++ b/wordpress/wp-content/themes/backer/includes/ignitiondeck-templates/_checkoutForm.php @@ -8,7 +8,7 @@ echo wp_login_form($args); ?> - +
data-free="" data-txn-type="" data-renewable="" data-limit-term="" data-term-limit="" data-scpk="" data-claimedpp="" data-pay-by-credits="">
@@ -67,27 +67,29 @@
- + + + - +

Donation of $ to

Your donation to , a 501c3 organization, may be tax deductible.

- +

Loan of $ to

You are making a 0% interest loan with the expectation of being paid back by the borrower within 5 years. It is not tax deductible.

- - + +
- +
@@ -118,7 +120,7 @@
- +
@@ -130,7 +132,7 @@
-
+ @@ -139,10 +141,10 @@ - + - + @@ -251,7 +253,7 @@
-
'; } } ?> - +
@@ -92,7 +100,7 @@

of $ goal

- +
@@ -111,7 +119,7 @@
- Closed
'; } else if($status == 'completed'){ @@ -137,33 +145,33 @@ post_title; ?> - +

- +

- +
- +

About this project

- +

- +
- +
@@ -176,12 +184,12 @@
  • ID, 'ign_product_title_2', true ); ?>
  • - ID, $name="ign_product_level_count_2", true ); for ($i=2 ; $i <= $meta_no_levels_2 ; $i++) { $filename = stripslashes(get_post_meta( $post->ID, $name="ign_product_level_2_".($i)."_filename", true )); $meta_title = stripslashes(get_post_meta( $post->ID, $name="ign_product_level_2_".($i)."_title", true )); - + echo '
  • '.$meta_title.'
  • '; } ?> @@ -215,24 +223,24 @@
  • ID, 'ign_product_title_3', true ); ?>ID, 'ign_product_image_3', true ); ?>
  • - + ID, $name="ign_product_level_count_3", true ); - + for ($i=2 ; $i <= $meta_no_levels_3 ; $i++) { $what = stripslashes(get_post_meta( $post->ID, $name="ign_product_level_3_".($i)."_what", true )); $when = stripslashes(get_post_meta( $post->ID, $name="ign_product_level_3_".($i)."_when", true )); ?> - +
  • - + - - + +
    @@ -300,7 +308,7 @@ window.onload = function() { window.myRadar = new Chart(document.getElementById("canvas"), config); }; - $('#randomizeData').click(function() { + jQuery('#randomizeData').click(function() { $.each(config.data.datasets, function(i, dataset) { dataset.data = dataset.data.map(function() { return randomScalingFactor(); @@ -308,7 +316,7 @@ }); window.myRadar.update(); }); - $('#addDataset').click(function() { + jQuery('#addDataset').click(function() { var newDataset = { label: 'Dataset ' + config.data.datasets.length, borderColor: randomColor(0.4), @@ -324,7 +332,7 @@ config.data.datasets.push(newDataset); window.myRadar.update(); }); - $('#addData').click(function() { + jQuery('#addData').click(function() { if (config.data.datasets.length > 0) { config.data.labels.push('dataset #' + config.data.labels.length); $.each(config.data.datasets, function (i, dataset) { @@ -333,11 +341,11 @@ window.myRadar.update(); } }); - $('#removeDataset').click(function() { + jQuery('#removeDataset').click(function() { config.data.datasets.splice(0, 1); window.myRadar.update(); }); - $('#removeData').click(function() { + jQuery('#removeData').click(function() { config.data.labels.pop(); // remove the label first $.each(config.data.datasets, function(i, dataset) { dataset.data.pop(); @@ -345,11 +353,11 @@ window.myRadar.update(); }); - - - - - + + + + +
    @@ -366,13 +374,13 @@

    - - + +
    - - + +
    Environmental @@ -414,16 +422,16 @@
    - - + + the_deck(); - echo do_action('id_widget_after', $project_id, $the_deck); + echo do_action('id_widget_after', $project_id, $the_deck); ?> - - + +