setCampaignParamsFromUrl method

void setCampaignParamsFromUrl(
  1. String? url
)

Implementation

void setCampaignParamsFromUrl(final String? url) {
  if (url != null && url.isNotEmpty) {
    final uri = Uri.parse(url);
    set("&cc", uri.queryParameters["utm_content"]);
    set("&cm", uri.queryParameters["utm_medium"]);
    set("&cn", uri.queryParameters["utm_campaign"]);
    set("&cs", uri.queryParameters["utm_source"]);
    set("&ck", uri.queryParameters["utm_term"]);
    set("&ci", uri.queryParameters["utm_id"]);
    set("&anid", uri.queryParameters["anid"]);
    set("&gclid", uri.queryParameters["gclid"]);
    set("&dclid", uri.queryParameters["dclid"]);
    set("&aclid", uri.queryParameters["aclid"]);
    set("&gmob_t", uri.queryParameters["gmob_t"]);
  }
}