Title: Plugin session and redirects
Last modified: April 9, 2021

---

# Plugin session and redirects

 *  Resolved [loikisamu](https://wordpress.org/support/users/loikisamu/)
 * (@loikisamu)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/plugin-session-and-redirects/)
 * We have used the Salesforce plugin for our integrations. Now we need to get Google
   and Facebook referral codes from the URL such as ?gclid= and ?fbclid= to tell
   where we came to the salesforce form.
 * Problem here is that these come in internal redirects which means they redirect
   back to the form without referral codes which we need for the integration.
 * We have tried to make our own sessions but we get “PHP Warning: session_start():
   Cannot start session when headers already sent in …”
 * We also tried with cookies but no luck. Is there a way to use sessions or cookies
   with this plugin. And if not, is there another way we can get the referral codes
   from the URL.

Viewing 1 replies (of 1 total)

 *  Plugin Author [brilliantplugins](https://wordpress.org/support/users/brilliantplugins/)
 * (@brilliantplugins)
 * [5 years ago](https://wordpress.org/support/topic/plugin-session-and-redirects/#post-14440014)
 * You can’t get something from there URL that isn’t there.
 * You’d need to store that in a session or cookie so it persists during the user
   session. I’d suggest you look at a plugin like these to handle that:
 * [https://wordpress.org/plugins/handl-utm-grabber/](https://wordpress.org/plugins/handl-utm-grabber/)
 * [https://wordpress.org/plugins/utm-tracker/](https://wordpress.org/plugins/utm-tracker/)
 * Then use a plugin filter (see the readme for example code) to autofill those 
   values into a hidden field for submitting to Salesforce.

Viewing 1 replies (of 1 total)

The topic ‘Plugin session and redirects’ is closed to new replies.

 * ![](https://ps.w.org/salesforce-wordpress-to-lead/assets/icon-256x256.png?rev
   =2316786)
 * [Brilliant Web-to-Lead for Salesforce](https://wordpress.org/plugins/salesforce-wordpress-to-lead/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/salesforce-wordpress-to-lead/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/salesforce-wordpress-to-lead/)
 * [Active Topics](https://wordpress.org/support/plugin/salesforce-wordpress-to-lead/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/salesforce-wordpress-to-lead/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/salesforce-wordpress-to-lead/reviews/)

## Tags

 * [cookies](https://wordpress.org/support/topic-tag/cookies/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)
 * [session](https://wordpress.org/support/topic-tag/session/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * 1 reply
 * 2 participants
 * Last reply from: [brilliantplugins](https://wordpress.org/support/users/brilliantplugins/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/plugin-session-and-redirects/#post-14440014)
 * Status: resolved