Adobe tag manager - Direct Call Routes - Direct call rule "DCTEST" not found - adobe

Just wanted to know if anyone has ever seen this error when setting up Adobe Tag Manager Direct Call Routes. Direct call rule "DCTEST" not found.
I've logged created a new direct call rule named it DC TEST
In the conditions section named it DCTEST
In Adobe Analytic selected -> s.t(); - increment a pageview
Then in Javascript selected Non-Sequential and created a javascript script and added
window.alert("DC Fired")
Then in my localhost called
_satellite.track("DCTEST");
I get the error:
SATELLITE: Direct call Rule "DCTEST" not found
Event based tracking works and datalayer is populated as expected but when creating a direct call rule it doesn't seem to find what I've set up?
Followed the adobe video but still no luck?
https://outv.omniture.com/?v=tvaTY4ZzoJ087ioJpJptl9npM_8QGDxU
Any ideas?
Can anyone get the video to tutorial to work?
https://outv.omniture.com/?v=tvaTY4ZzoJ087ioJpJptl9npM_8QGDxU
Thanks

That error message is output when
a) The direct call rule doesn't exist
b) The direct call rule isn't published and you are in published/live mode (which is effectively the same thing as (a), in principle)
If you are using the production tag, you can put it into staging/debug mode by entering the following into your js console:
localStorage.setItem('sdsat_stagingLibrary',true);_satellite.setDebug(true);location.reload();
You can make a browser bookmark out of it like so:
javascript:try{localStorage.setItem('sdsat_stagingLibrary',true);_satellite.setDebug(true);location.reload();}catch(e){}
Then you can just press a bookmark button to put it into staging/debug mode.
Also there is an Adobe DTM Switch browser plugin which basically does the same thing (though it doesn't reload the page when you flip switches, so you still have to do that for it to take effect).

Related

Codeceptjs doesn't load most elements, waitForNavigation() just causes it to freeze forever

I am having an issue testing with codeceptjs. I am attempting testing apps on the Atlassian cloud but codeceptjs/puppeteer cannot interact with any of the elements on the page. When I enable screenshots I see it is on the right page but codeceptjs can only find the elements in the navigation menu. it cannot even find the body element either by selector or xpath.
I tried adding I.waitForNavigation() but the tests never advance past that step. I tried to set a timeout in the config section as they say in the docs here but I am having no luck. I tried everything they suggested but it just waits there forever. if I comment out I.waitForNavigation() it will fail because it cannot find a Boyd element. I am using the default config file that gets created when you install codeceptjs in a directory. this the code I am trying to test but it is causing all kinds of issues.
I.amOnPage('https://artemis-test2.atlassian.net/wiki/plugins/servlet/ac/com.nurago.confluence.plugins.treecopy/copy-page-tree-confluence?page.id=25821196&space.key=TEST1');
I.waitForNavigation();
// if I don't comment this out it will wait here forever
I.wait(4);
I.waitForElement('.ap-iframe');
// it can find the iframe for some reason but nothing else
I.waitForElement('.body');
// if I do comment it out it fails here because it says there is no body element. can't find it by xpath either.
I have no idea why this is happening. any help is greatly appreciated.
amOnPage with default config runs navigation and passes after navigation.
waitForNavigation will start to wait navigation after navigation. So it never happens, if you will not run navigation again or page redirect starts.
You have 2 choices:
not to use waitForNavigation and use amOnPage only.
use waitForNavigation and amOnPage within Promise.all: await Promise.all(I.waitForNavigation(); I.amOnPage(pageUrl));

Google Tag Manager is breaking src attribute in production

I have a tracking Iframe that is deployed through a custom HTML tag and triggered on the window loaded event.
The src attribute takes several custom JS variables to populate certain parameters where available.
However, in production the src attribute is full of errors that aren't showing up in preview mode. There are no issues with the variables themselves, as they have all been unit tested extensively.
Below are (1) the tag config for the iFrame's src attribute as shown within GTM, (2) the html produced in preview/debug mode, and (3) the html that's actually being produced in production:
​
src="//servedby.flashtalking.com/container/14745;109435;11282;iframe/?ftXRef={{TransID Availability Test - Onetag}}&ftXValue={{Revenue Availability Test - Onetag}}&ftXType=FTXTYPE_VALUE&ftXName=FTXNAME_VALUE&ftXNumItems=FTXNUMITEMS_VALUE&ftXCurrency=FTXCURRENCY_VALUE&U1=U1_VALUE{{dataLayer Stations Output - Onetag}}{{Journey Date Output - Onetag}}{{Journey Ticket Type Output - Onetag}}&U8=U8_VALUE&U9=U9_VALUE&U10=U10_VALUE&U11=U11_VALUE&U12=U12_VALUE&U13=U13_VALUE&U14=U14_VALUE&U15=U15_VALUE&U16=U16_VALUE&U17=U17_VALUE&U18=U18_VALUE&U19=U19_VALUE&U20=U20_VALUE&ft_referrer={{Encoded Page URL}}&ns={{Referrer}}&cb={{Random Number}}"
https://servedby.flashtalking.com/container/14745;109435;11282;iframe/?ftXRef=2526968585&ftXValue=1.2&ftXType=FTXTYPE_VALUE&ftXName=FTXNAME_VALUE&ftXNumItems=FTXNUMITEMS_VALUE&ftXCurrency=FTXCURRENCY_VALUE&U1=U1_VALUE%26U2%3DU2_VALUE%26U3%3DU3_VALUE%26U4%3D28%2F12%2F19%26U5%3D%26U6%3DSDS%26U7%3DU7_VALUE&U8=U8_VALUE&U9=U9_VALUE&U10=U10_VALUE&U11=U11_VALUE&U12=U12_VALUE&U13=U13_VALUE&U14=U14_VALUE&U15=U15_VALUE&U16=U16_VALUE&U17=U17_VALUE&U18=U18_VALUE&U19=U19_VALUE&U20=U20_VALUE&ft_referrer=https%253A%252F%252Fwww.domain.co.uk%252Fbuytickets%252Fpaymentconfirmation.aspx&ns=https%3A%2F%2Fwww.domain.co.uk%2Fbuytickets%2Fpaymentconfirmation.aspx&cb=126603136
https://servedby.flashtalking.com/container/438;87804;9034;iframe/?ftXRef=2526968585&ftXValue=1.2&U1=paymentconfirmation&U3=1&U4=01000&U7=28/12/19&U9=BIRMINGHAM%20NEW%20STREET&U10=BIRMINGHAM%20SNOW%20HILL&ft_referrer=https%3A//www.domain.co.uk/buytickets/paymentconfirmation.aspx&ns=https%3A//www.domain.co.uk/buytickets/paymentconfirmation.aspx&cb=473400.6608119874
​​As you can see, the section in (2) in bold/italics is being removed entirely in production, despite the fact that these parameters aren't configured to be populated or modified by any variables. Similarly, parameters U9 and U10 are being populated seemingly from nothing - they aren't set to be populated by any variables.
Those parameters that are configured to be populated by custom variables aren't working properly - the values shown in production are either absent or else don't match the results given either in debug/preview or in unit testing, which suggests the problem is with GTM itself.
Are you sure that these are the same tag? Looking at the top tag it starts
/container/14745;109435;11282
and the bottom tag starts
/container/438;87804;9034
To me, the tags seem so completely different that I don't believe they're the same. GTM may do many things, but it doesn't randomly change your code! I've never seen it remove variables, or add them in, or change strings, it wouldn't have the ability to. Custom HTML tags are literally written 'as is' into the GTM.js file, with the exception of variables being replaced with macros.
If you've recently updated the tag then other reasons you're not seeing the changes may be:
You're looking at a cached version of GTM, in which case empty your cache, refresh the page and that should sort it.
You're working in and previewing changes that haven't been published, so won't show on the live site; if you publish the changes that should work.
If neither of those work then it would be good if you could share a link to the site so I can investigate!

Edit is missing and Add Item not working in 2sxc 9.32.1 on DNN EVOQ BASIC v. 09.01.01

Just upgraded to DNN EVOQ BASIC v. 09.01.01 (113) and 2sxc 9.32.1
After placing the Content module on a page, some of our templates do not have Edit options and some of them that have an Add Item option doesn't do anything after clicked.
When I click on Add Item, I get this error:
Uncaught SyntaxError: Unexpected token T in JSON at position 0
at JSON.parse (<anonymous>)
at Object.t.showDetailedHttpError (ToSic.Sxc.Instance.ts:73)
at fire (jquery.js?cdv=209:1037)
at Object.fireWith [as rejectWith] (jquery.js?cdv=209:1148)
at done (jquery.js?cdv=209:8076)
at XMLHttpRequest.callback (jquery.js?cdv=209:8598)
This sounds like a skin / container compatibility issue, the "content module" you mention, is this the core text / html module or something else?
As a test, change the page skin and or module container to one that comes with the core 9.1.1 install and retest
DC
I don't know for sure what's happening, but let me give you a bit of background. When an editor is on the page, 2sxc adds some configuration information as json in the html-attributes, which the UI the needs to know what you were clicking on etc.
To me it sound like something is breaking this - either because a server-side filter is changing the HTML (not likely, but possible), or another javascript is running which changes the DOM, resulting in removed or broken attributes.
To get this resolved, pls verify that you can find these jsons in the html-tags (they are very obvious) by looking at the html-source. If they are there and look ok, it's not the server that's breaking it.
Then check if they are still there in Chrome-Debugger (F12) which doesn't show you the source as the server sent it, but the source as the browser currently has it. I'm pretty sure it will be off somehow, because maybe a neat jQuery mangles the HTML.
Love from Switzerland,
iJungleboy

Alfresco Aikau debugging

In Alfresco Share the Search page is implemented with Aikau.
I'm interested in the more general question, is it possible to Debug Aikau widgets?
I have founds some links on this matter, but they talk more about logging and not actual javascript debugging:
http://docs.alfresco.com/5.1/tasks/dev-extensions-share-tutorials-debugging.html
https://github.com/Alfresco/Aikau/blob/master/tutorial/chapters/Tutorial4.md
Suppose I have the following Aikau widget alfresco/search/AlfSearchResult and the following method inside it:
/**
* This function is called to create a
* [SearchResultPropertyLink]{#link module:alfresco/renderers/SearchResultPropertyLink} widget
* to render the displayName of the result. It can be overridden to replace the default widget
* with a reconfigured version.
*
* #instance
*/
createDisplayNameRenderer: function alfresco_search_AlfSearchResult__createDisplayNameRenderer() {
// jshint nonew:false
var config = {
id: this.id + "_DISPLAY_NAME",
currentItem: this.currentItem,
pubSubScope: this.pubSubScope,
propertyToRender: "displayName",
renderSize: "large",
newTabOnMiddleOrCtrlClick: this.newTabOnMiddleOrCtrlClick,
defaultNavigationTarget: this.navigationTarget
};
if (this.navigationTarget)
{
config.navigationTarget = this.navigationTarget;
}
new SearchResultPropertyLink(config, this.nameNode);
}
Is there any way I could insert a breakpoint and stop execution at the line where this.currentItem is used in order for me to evaluate it's properties?
Yes, there are several ways in which you can debug Aikau... the first thing to do is to make sure that you're running with "client-debug" mode enabled (either in Share or in your custom Aikau client).
For example, in Share you'd want to update the /WEB-INF/classes/alfresco/share-config.xml file to change:
<config>
<flags>
<client-debug>false</client-debug>
...to be...
<config>
<flags>
<client-debug>true</client-debug>
You'll need to restart Share for the changes to take effect. You'll see then that you have a "Debug Menu" item in the main header menu bar. If you open this you can enable logging by toggling "Debug Logging" and "Show All Logs" to be true.
This will result in logging output appearing in your browser developer tools console. You can also fine tune the logging output to only show errors or warning and to provide a RegEx expression to match certain logging output.
With client debug enabled the JavaScript source being loaded by the browser will be uncompressed. This will make it easier for you to add break points.
Because Surf aggregates all of the required module source code into a single resource (for performance and caching reasons) you will want to find the Aikau source file - the easiest way to do this is to use "CTRL-P" (in Chrome) to open a resource and type "surf" into the box that appears - this will always find the Aikau source code first.
Firebug for Firefox handles finding across resources better, so you can just used "CTRL-F" and then paste in the line you want to break on.
You can add breakpoints in this resource as you normally would and the browser will break on them.
As well as setting break points you can also use the DebugLog widget. This can be toggled from the "Debug Menu" and shows all the publications and subscriptions that are being made.
It is also possible to directly include and configure the alfresco/services/LoggingService and the alfresco/logging/DebugLog widgets in your page as you are developing. We take this approach for all our unit test pages. This can be a handy approach during development and they can be removed when you're finished developing.
This presentation although quite old, also contains some useful debugging tips (see slide 56 onwards).

Chrome Extension: Communication iframe <-> Content Script

Well, a often discussed thing. But I can't get it work. What has to be done:
The Content or Background Script has to communicate with the iframe et vice versa.
The iframe is under my hand, so there is everything possible.
I tried a lot. It doesn't work at all. For instance: If I deploy the content script on every page with allFrames=true via (manifest). Ok, makes sense. The iframe is created later so the trigger won't be called. So let's do this: create the iframe and afterwards sending an executeScript request:
chrome.tabs.executeScript(tabinst.tab_id, { allFrames: true, file:'frame.js'}, function() {
console.log("done");
});
But that doesn't work either. Has anyone a solution to communicate with an XDM iframe and a chrome extension?
PS: How nice it would be if the chrome extension would allow postMessage on iframe
EDIT1:
The code doesn't get injected in the iframe. Scenario:
The file "file.js" has a simple foo function in it. I now apply it with the above statement 2 seconds after the iframe was created and showed. This function foo is not available in the iframe...but is in the content script. The ReferenceError is thrown by trying to execute foo within the iframe (by click).
So, it's not a timing thing. And it doesn't matter if I apply the Scripts via manifest and all_frames true. If that would work, the content_script would be available. But is not.
EDIT2:
#serg
Yeah, thanks, that works! I just got through it. My problem was, that I assumed that when the callback of chrome.tabs.executeScript is called, the requested script is ended and the including DOM manipulation finished. But that's actually not the case. It takes some time till the script in the iframe and the containing listener is ready.
So I had to send a chrome.extension.sendRequest from that script in the iframe and then start some code out of the background listener to manipulate the iframe. Thanks for your help.
PS: It's also possible to do it without "all_frames": true. It just takes some time till the dynamic iframe is ready. With a timeout it works. For the most cases, this is not useful, but maybe someone has another user interaction first.
PPS: I still can't see why it's possible like this, and not possible to send postMessage events. But maybe somewhen this will works.
I just tested and content script is getting injected into dynamically created iframes (I used manifest). I think the problem is you are trying to access content script's function within iframe, which is not allowed.
Inside your iframe you can't just do:
<a onclick="contentScriptFunction()"></a>
You need to be adding event listener from within the content script:
$("a").click(contentScriptFunction);

Resources