Skip to content

Commit

Permalink
fix fullstory and informizely, make mbta_id readable by JS (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-mahoney authored Sep 6, 2019
1 parent 47ed1af commit bfe04e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions apps/site/assets/js/fullstory.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Cookies from "./cookies";

export default function fullstory() {
const MODULO_SAMPLE = 25;
const MODULO_SAMPLE = 50;
const id = getUniqueId();

// Only execute the fullstory code if the id is a multiple of the selected modulo
Expand All @@ -13,10 +13,10 @@ export default function fullstory() {
// This is the snippet that was generqated by Full Story. No changes were made to
// this auto-generated code
function fullStoryInit() {
window["_fs_debug"] = false;
window["_fs_host"] = "fullstory.com";
window["_fs_org"] = "AQKVD";
window["_fs_namespace"] = "FS";
window._fs_debug = false;
window._fs_host = "fullstory.com";
window._fs_org = "AQKVD";
window._fs_namespace = "FS";
(function(m, n, e, t, l, o, g, y) {
if (e in m) {
if (m.console && m.console.log) {
Expand All @@ -33,7 +33,7 @@ function fullStoryInit() {
g.q = [];
o = n.createElement(t);
o.async = 1;
o.src = "https://" + _fs_host + "/s/fs.js";
o.src = `https://${_fs_host}/s/fs.js`;
y = n.getElementsByTagName(t)[0];
y.parentNode.insertBefore(o, y);
g.identify = function(i, v) {
Expand Down Expand Up @@ -62,7 +62,7 @@ function fullStoryInit() {
};

g.clearUserCookie = function() {};
})(window, document, window["_fs_namespace"], "script", "user");
})(window, document, window._fs_namespace, "script", "user");
}

function getUniqueId() {
Expand Down
2 changes: 1 addition & 1 deletion apps/site/lib/site_web/plugs/cookies.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule SiteWeb.Plugs.Cookies do
@route_cookie_name "mbta_visited_routes"

@id_cookie_options [
http_only: true,
http_only: false,
# 20 years
max_age: 20 * 365 * 24 * 60 * 60
]
Expand Down

0 comments on commit bfe04e3

Please sign in to comment.