Skip to content

Instantly share code, notes, and snippets.

@mak00s
Created November 5, 2017 11:08
Show Gist options
  • Save mak00s/15d0fed9cb242cc742c65adcccc19d3c to your computer and use it in GitHub Desktop.
Save mak00s/15d0fed9cb242cc742c65adcccc19d3c to your computer and use it in GitHub Desktop.
キャンペーン用URLパラメータをキレイにする(s_code.js)part 1 of 2
// パラメータ名「cid」の部分は適宜変更
s.campaign = getHashQueryParam('cid');
// クエリにも同時対応する場合は以下のように書ける
s.campaign = s.getQueryParam('cid') || s.getHashQueryParam('cid');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment