From 83545136ba9d11942b5be3c474ee1e309c6f505a Mon Sep 17 00:00:00 2001 From: Ryan Scherf Date: Mon, 27 Feb 2017 12:12:39 -0600 Subject: [PATCH 01/11] Start tracking checkout. --- .../wp-content/plugins/idcommerce/js/idcommerce.js | 7 +++++++ .../plugins/idcommerce/templates/_checkoutForm.php | 12 +++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/wordpress/wp-content/plugins/idcommerce/js/idcommerce.js b/wordpress/wp-content/plugins/idcommerce/js/idcommerce.js index 48c3c3f1..b7c3734d 100644 --- a/wordpress/wp-content/plugins/idcommerce/js/idcommerce.js +++ b/wordpress/wp-content/plugins/idcommerce/js/idcommerce.js @@ -692,6 +692,13 @@ jQuery(document).ready(function() { }); ga('ecommerce:send'); + fbq('track', 'Purchase', { + value: parseFloat(pwywPrice), + currency: 'USD', + content_ids: [orderID.toString()], + content_name: product.toString(), + }); + 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 e56aa005..6a50bc9a 100644 --- a/wordpress/wp-content/plugins/idcommerce/templates/_checkoutForm.php +++ b/wordpress/wp-content/plugins/idcommerce/templates/_checkoutForm.php @@ -1,3 +1,9 @@ + +
data-free="" data-txn-type="" data-renewable="" data-limit-term="" data-term-limit="" data-scpk="" data-claimedpp="" data-pay-by-credits=""> @@ -82,7 +88,7 @@ - + @@ -134,7 +140,7 @@
@@ -179,7 +185,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 )); ?> - +
  • - + - - + +
    @@ -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); ?> - - + + -- GitLab From 17af8c5d5effabf3c93e3e92aaf3702ad3ae5152 Mon Sep 17 00:00:00 2001 From: Steven Walker Date: Mon, 27 Feb 2017 15:47:57 -0500 Subject: [PATCH 03/11] Removing 'test' word --- .../backer/includes/ignitiondeck-templates/_checkoutForm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 4f5a09e8..dfa63ca6 100644 --- a/wordpress/wp-content/themes/backer/includes/ignitiondeck-templates/_checkoutForm.php +++ b/wordpress/wp-content/themes/backer/includes/ignitiondeck-templates/_checkoutForm.php @@ -131,7 +131,7 @@ -- GitLab From df8c29cd34da019bf620f3f32e988b99d9e41db0 Mon Sep 17 00:00:00 2001 From: Ryan Scherf Date: Tue, 28 Feb 2017 10:17:47 -0600 Subject: [PATCH 04/11] Fix JS error for jQuery --- .../themes/backer/header-projectsingle.php | 15 +++++++-------- wordpress/wp-content/themes/backer/header.php | 13 +++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/wordpress/wp-content/themes/backer/header-projectsingle.php b/wordpress/wp-content/themes/backer/header-projectsingle.php index 3cc5d38c..9958d2c3 100644 --- a/wordpress/wp-content/themes/backer/header-projectsingle.php +++ b/wordpress/wp-content/themes/backer/header-projectsingle.php @@ -40,10 +40,10 @@ - - + + @@ -59,7 +59,7 @@ nav:true, items: 1, autoplay:true, - + }); $('a').click(function() { mixpanel.track("Page View"); @@ -79,11 +79,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 +111,7 @@
    - - +
    @@ -164,4 +164,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 69d63992..0310882e 100644 --- a/wordpress/wp-content/themes/backer/header.php +++ b/wordpress/wp-content/themes/backer/header.php @@ -28,8 +28,11 @@ + + + - - - @@ -77,7 +78,7 @@ src="https://www.facebook.com/tr?id=1980302352204881&ev=PageView&noscript=1"
    - - +
    -- GitLab From 8cbc912107f2135365dbeb15afe785890901f048 Mon Sep 17 00:00:00 2001 From: Ryan Scherf Date: Tue, 28 Feb 2017 10:18:59 -0600 Subject: [PATCH 05/11] Remove Mixpanel. --- .../themes/backer/header-projectsingle.php | 12 ------- wordpress/wp-content/themes/backer/header.php | 17 ---------- .../themes/backer/js/scripts.dev.js | 32 +++++++++---------- 3 files changed, 15 insertions(+), 46 deletions(-) diff --git a/wordpress/wp-content/themes/backer/header-projectsingle.php b/wordpress/wp-content/themes/backer/header-projectsingle.php index 9958d2c3..4dff97d4 100644 --- a/wordpress/wp-content/themes/backer/header-projectsingle.php +++ b/wordpress/wp-content/themes/backer/header-projectsingle.php @@ -44,10 +44,6 @@ - - @@ -61,14 +57,6 @@ 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( '' ); $( '
    ' ).insertAfter( '#main-content' ); diff --git a/wordpress/wp-content/themes/backer/header.php b/wordpress/wp-content/themes/backer/header.php index 0310882e..1800b7fd 100644 --- a/wordpress/wp-content/themes/backer/header.php +++ b/wordpress/wp-content/themes/backer/header.php @@ -32,23 +32,6 @@ - - - diff --git a/wordpress/wp-content/plugins/idcommerce/templates/_orderLightbox.php b/wordpress/wp-content/plugins/idcommerce/templates/_orderLightbox.php index 580d75d0..51bfa638 100644 --- a/wordpress/wp-content/plugins/idcommerce/templates/_orderLightbox.php +++ b/wordpress/wp-content/plugins/idcommerce/templates/_orderLightbox.php @@ -7,6 +7,7 @@ if (!is_array($general) && !empty($general)) { - + - +

    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 +118,7 @@
    - +
    @@ -130,7 +130,7 @@
    -
    + @@ -139,10 +139,10 @@ - + - + @@ -251,7 +251,7 @@
    - - + - + -- GitLab From b0511dd7c0fd8cc6e595ea1ca291773625a57a73 Mon Sep 17 00:00:00 2001 From: Ryan Scherf Date: Tue, 28 Feb 2017 15:07:30 -0600 Subject: [PATCH 11/11] Track level." --- wordpress/wp-content/plugins/idcommerce/js/idcommerce.js | 3 ++- .../backer/includes/ignitiondeck-templates/_checkoutForm.php | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wordpress/wp-content/plugins/idcommerce/js/idcommerce.js b/wordpress/wp-content/plugins/idcommerce/js/idcommerce.js index 7dc17d43..fab5e6f4 100644 --- a/wordpress/wp-content/plugins/idcommerce/js/idcommerce.js +++ b/wordpress/wp-content/plugins/idcommerce/js/idcommerce.js @@ -581,6 +581,8 @@ jQuery(document).ready(function() { }); function trackPurchase(orderID, product, price) { + var level = jQuery("input#payment_level").val(); + // Add Transaction Data ga('ecommerce:addTransaction', { 'id': orderID.toString(), @@ -597,7 +599,6 @@ jQuery(document).ready(function() { ga('ecommerce:send'); ga('send', 'event', 'Project Contribution', 'Donation Complete', ''); - console.log("before tracking purchase") fbq('track', 'Purchase', { value: parseFloat(price), currency: 'USD', 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 83d9e4fd..de3808c6 100644 --- a/wordpress/wp-content/themes/backer/includes/ignitiondeck-templates/_checkoutForm.php +++ b/wordpress/wp-content/themes/backer/includes/ignitiondeck-templates/_checkoutForm.php @@ -68,6 +68,8 @@
    + +

    Donation of $ to

    -- GitLab