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?


  • 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:

    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,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.