File tree 1 file changed +11
-10
lines changed
1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -93,25 +93,26 @@ The only other step remaining is to register the web-hook with Stripe:
93
93
Also, choose "Send me all events" to make sure Laravel Mixpanel can make full use of the Stripe data.
94
94
95
95
### JavaScript Events & Auto-Track
96
- #### Laravel Elixir
97
- Add the following lines to your ` /resources/js/app.js ` (or equivalent), and
98
- don't forget to replace ` YOUR_MIXPANEL_TOKEN ` with your actual token:
99
- ``` js
100
- require (' ./../../../public/genealabs-laravel-mixpanel/js/mixpanel.js' );
101
- mixpanel .init (" YOUR_MIXPANEL_TOKEN" );
102
- ```
103
-
104
- #### Blade Template
96
+ #### Blade Template (Recommended)
105
97
First publish the necessary assets:
106
98
``` sh
107
99
php artisan mixpanel:publish --assets
108
100
```
109
101
110
- Then add the following to the head section of your layout template:
102
+ Then add the following to the head section of your layout template (already does
103
+ the init call for you, using the token from your .env file):
111
104
``` blade
112
105
@include ('genealabs-laravel-mixpanel::partials.mixpanel')
113
106
```
114
107
108
+ #### Laravel Elixir
109
+ Add the following lines to your ` /resources/js/app.js ` (or equivalent), and
110
+ don't forget to replace ` YOUR_MIXPANEL_TOKEN ` with your actual token:
111
+ ``` js
112
+ require (' ./../../../public/genealabs-laravel-mixpanel/js/mixpanel.js' );
113
+ mixpanel .init (" YOUR_MIXPANEL_TOKEN" );
114
+ ```
115
+
115
116
## Usage
116
117
MixPanel is loaded into the IoC as a singleton. This means you don't have to manually call $mixPanel::getInstance() as
117
118
described in the MixPanel docs. This is already done for you in the ServiceProvider.
You can’t perform that action at this time.
0 commit comments