integrating Pay Per View with Google Analytic Goals

I would like to be able to record in Google Analytics the successful sale of a Pay Per View element of my website as a "goal" in Analytics. Is there a way to do this?

Thanks,
Ethan

  • Michael Bissett

    Hey @Ethan, hope you're doing well today! :slight_smile:

    One thing you could try would be to add a onClick parameter to the link, like what this suggests:

    http://stackoverflow.com/a/21147516

    To do this, you would need to edit line 828 of pay-per-view/pay-per-view.php:

    $content .= '<input type="submit" name="ppw_final_payment" value="'.sprintf(__('Confirm %s %s payment to see this content','ppw'),$_SESSION["ppw_total_amt"],$this->options["currency"]).'" />';

    Please note though, that the changes made to the file would be overwritten on an update to the plugin, so you'll want to note the code changes made. :slight_smile:

    Hope this helps!

    Kind Regards,
    Michael