Skip to content

Instantly share code, notes, and snippets.

@mkwsra
Created December 21, 2021 22:38
Show Gist options
  • Save mkwsra/53aad2bf3d8097b1ea4f3f4de49fed8d to your computer and use it in GitHub Desktop.
Save mkwsra/53aad2bf3d8097b1ea4f3f4de49fed8d to your computer and use it in GitHub Desktop.
An Example of using StoreMarketingQueryParamsMiddleware.php
<!-- .... -->
<!-- UTM params -->
<input type="hidden" name="utm_source" value="{{ session('utm_source') }}">
<input type="hidden" name="utm_medium" value="{{ session('utm_medium') }}">
<input type="hidden" name="utm_campaign" value="{{ session('utm_campaign') }}">
<input type="hidden" name="utm_term" value="{{ session('utm_term') }}">
<input type="hidden" name="utm_content" value="{{ session('utm_content') }}">
<!-- Other handy inputs for marketing ROIs -->
<input type="hidden" name="url" value="{{request()->url()}}">
<input type="hidden" name="ip_address" class="ip" value="{{request()->ip()}}">
<input type="hidden" name="locale" value="{{ app()->getLocale() }}">
<!-- And you might want to add other inputs like: country, currency ..etc -->
<!-- .... -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment