Laravel
Step-by-step guide to add ProofyBubble to your Laravel application
Follow these steps to integrate ProofyBubble into your Laravel application.
The recommended way to add scripts to all pages in a Laravel application is by using the main layout file.
Open your project's main layout file, typically located at resources/views/layouts/app.blade.php
.
Add the ProofyBubble script to the <head>
section:
<!DOCTYPE html> <html> <head> <!-- ... other head elements ... --> <script id="credibility-client-{{ config('proofybubble.id') }}" type="module" crossorigin="anonymous" data-app-id="{{ config('proofybubble.app_id') }}" src="https://client.proofybubble.com/assets/embed.js" ></script> </head> <body> @yield('content') </body> </html>
For better configuration management, create a ProofyBubble config file:
Create config/proofybubble.php
:
<?php return [ 'id' => env('PROOFYBUBBLE_ID'), 'app_id' => env('PROOFYBUBBLE_APP_ID'), ];
Add to your .env
file:
PROOFYBUBBLE_ID=<your-id>
PROOFYBUBBLE_APP_ID=<your-app-id>
- Replace
<your-id>
with your actual Website ID from ProofyBubble. - Replace
<your-app-id>
with your actual App ID from ProofyBubble.
If ProofyBubble supports server-side revenue tracking, follow the documentation in your ProofyBubble dashboard to connect your payment provider and pass any required metadata or cookies during checkout. (If not applicable, you can skip this step.)
After implementing:
- Visit your live website.
- Check your ProofyBubble dashboard for incoming data. It might take a few minutes for the first pageviews or events to appear.
- Once a purchase is made (if applicable), verify that revenue or events are being attributed correctly.