This guide explains how to create the S.Campaign on a landing with parameters cid (or other paramaters); what I don't understand is how to do if the user comes from Google (or another search engine) or from the referral traffic or from direct traffic.
Is there an official guide that explains how to populate the S.Campaign in these scenarios? I need to creare s.campaign using document.referrer?
You would need to install the plugin in your Analytics setup. You can then set campaign from query param in document.referrer by using this code: s.campaign=s.getQueryParam('cid','',document.referrer);