@ -54,7 +54,7 @@ this.Triggers = (function() {
trigger.conditions.forEach(function(condition) {
switch (condition.name) {
case 'page-url':
if (request.href.match(new RegExp(condition.value))) {
if (request.location.href.match(new RegExp(condition.value))) {
fire(trigger.actions);
}
break;
@ -70,7 +70,10 @@
};
var pageVisited = function() {
callHook('pageVisited', JSON.parse(JSON.stringify(document.location)));
callHook('pageVisited', {
location: JSON.parse(JSON.stringify(document.location)),
title: document.title
});
var currentPage = {