How to pass parameters via dsp:iframe to the iframe - atg

I want to pass <dsp:iframe> tag to the src jsp. As per ATG documentation I can use <dsp:param> tags to pass params and then use their value in the src of iframe. Can someone provide me with an example how this can be done?
Newbie in ATG

Below is some sample code:
<dsp:iframe page="homepage.jsp">Go to your home page
<dsp:param name="city" beanvalue="Profile.homeAddress.city"/>
</dsp:iframe>
The parameter is passed as any parameter is passed in ATG and can be retrieved in the same way any parameter is retrieved (assuming your iframe reference another JSP in your application. If the references an external page the parameter should be retrieved from the query string.
Not sure you have done any research as this is clearly defined in the oracle commerce help.

Related

How to integrate DTM (Dynamic Tag Management) with AEM 6?

I am a newbie to Adobe DTM (Dynamic Tag Management) and have not done any kind of training related to it. However, I have been given a requirement to integrate DTM with AEM 6. I Have some requirements related to Omniture where certain events on the website are tracked and that information needs to be sent to DTM. I have followed steps described on this blog (http://blogs.adobe.com/aemtutorials/2013/07/24/customize-the-client-context/) to customize the client context by creating a new session store and storing some sample data inside it. Now, next part is to retrieve this data into DTM which I am completely unaware on how to do. What is need to achieve in particular is to create a new data element as shown in the screenshot below and write some custom java script to access the data stored inside the client context (which is present in the session store) as explained in the blog mentioned.
I have no idea on how to integrate DTM with AEM instance and how to get hold of that data needed using the script. There is no info available on the internet regarding this, hence request you to help me in case anybody have worked on such a requirement earlier. Any help is highly appreciated
Step 1 - Set up DTM cloud services configuration in AEM. You may find cloud services config at /etc/cloudservices/dynamictagmanagement.html
Step 2 - Apply the above cloud config to the root of your website using the page property. This will insert the required JS scripts and JS object into the DOM. You could also do step (1) & (2) together by manually inserting header and footer code (from DTM) into the template.
Step 3 - Supply data to DTM JS object. This you could populate the data from server side or at client side using JS. You could leverage client context as well. JS APIs available to query client context.
PS: Am also a learner on this.
Helpful links:
http://blogs.adobe.com/experiencedelivers/experience-management/integrating-dtm-custom-aem6-page-template/
http://docs.adobe.com/docs/en/aem/6-0/administer/integration/marketing-cloud/dtm.html
You can use data elements with custom script like this:
e.g. dataElement authorizableId is custom script with content
return CQ_Analytics.ClientContext.get("/profile/authorizableId");
or
dataElement pageTitle
return CQ_Analytics.PageDataMgr.getProperty("title”);
This is how I implemented it. Please note that this implementation is for integrating with flat HTML files. Where we need to add the scripts in Head tag.
Pre-requisites:
1. We need to have login credentials for DTM website.
We need to have admin rights.
We need sc3.omniture site credentials. This is usually provided by Adobe team.
From Omniture console we need to generate the AppMeasurement.js file.
From AppMeasurement.js file we need to get important details like:
a. Tracking Server Name
b. s_account name
c. Visitor namespace
Connecting HTML files to DTM:
Login to https://dtm.adobe.com with admin credentials.
Click on Project dashboard
Click on Embed tab on top navigation.
Enable Host on Akamai.
Expand Header Code widget and copy the code.
Paste that code in the tag of your HTML.
Go back to DTM again. Expand Footer Code widget and copy the code.
Paste that code to the tag of your HTML.
Configuring DTM for Direct Call Rules:
1. Go to Rules tab from top navigation.
2. Click on Direct Call Rules from left navigation now.
Click on create rule.
Give it a name in the Name section.
Expand Conditions widget.
Pay close attention to the Conditions textbox. Direct Call Rules are fired using the _satelitte.track() method, and the text you enter in the Conditions textbox will be the argument you pass in this method. We entered “change-offer-submit”, so to fire this Direct Call Rule, we will use _satelitte.track(“change-offer-submit”) as you will see in the code below.
Now use the Adobe Analytics section to set up a custom link.
Below is the code that sets up our form and its validation. Notice the way the DTM _satelitte.track() is used. Each of the arguments passed in the _satelitte.track() method matches the Condition textbox in separate DTM rules.
HTML
<div class="outer-btn">
<input class="input-btn analyticsEvent" type="button" value="Submit" data-eventName="change-offer-submit">
</div>
JavaScript
<script>
jQuery('.analyticsEvent').on('click',function() {
window.console.log('Logged Event: ' + jQuery(this).attr('data-eventName'));
_satellite.track(jQuery(this).attr('data-eventName'));
location.href='./landingPage.html';
});
</script>
This has been superseded by a tool added to DTM in the June 2016 release, ContextHub was added in 6.1 as beta, in 6.2 it reached feature parity with ClientContext. It saves a lot of time building data layers as a lot of it will be there already .

Facebook php API and app_data parameter

I am building an application for Facebook that needs to be able to retrieve some custom parameters. I read that app_data is my solution and that I can easily retrieve the data I need by putting them there.
Now, I have made a custom page tab dialog that work great - really.
$response = $facebook->api("/".$pageWhereToInstallApp."/tabs","POST",array ('app_id' => $appID,'access_token'=>$accessToken));
As far as I've understood it the app_data parameter needs to be passed when the page tab is created. But, I can't find anywhere how I specify this parameter in the above code.
Any help is much appriciated.
Thank you.
/Jacob
As far as I've understood it the app_data parameter needs to be passed when the page tab is created.
That’s wrong (and would not make much sense, because that way it would be a rather static parameter).
You have to pass it when you link to your page tab app from somewhere external:
https://www.facebook.com/pagename/app_0123456789?app_data=foo

How to call wicket page from servlet

My application is mixed of wicket and jsp page . In my case i have to call wicket page from servlet with some value in request object . could someone please explain as how to achieve this. Thanks
What do you mean 'call a wicket page'? Do you mean load a wicket page to the user after he performs some action on the servlet-loaded page?
What exactly is your use case for this?
I think it would be better NOT to mix jsp and wicket, but given that you did:
BookmarkablePages provide a way to directly address a wicket page as it has a bookmarkable url (for instance, /home instead of /page?13). We use those to load a certain page with certain request parameters (ie, /student/1234/results shows the resultpage for student 1234).
Also, you could implement some kind of listener service that, based upon a certain call/payload, constructs a wicket page and returns the url for that page but that seems a bit overkill. In most cases I think bookmarkable pages a should suffice.
Have a look at http://wicket.apache.org/apidocs/1.5/org/apache/wicket/protocol/http/WebApplication.html#mountPage(java.lang.String, java.lang.Class)
or
http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/

Yii how to redirect to hash link form controller?

I'm working on YII framework. I've code form where I've to redirect to the page and in the page I've a grid view. I want to redirect to that hash link which will directly to take them to the grid. Because actually the changes are made to the grid.
$this->redirect(array('user/view','id'=>$mIntUserId));
How can I add a hash link to the existing URL #userList.
From yii documentation
Tip: In order to generate URL with a hashtag, for example
/index.php?r=post/read&id=100#title, you need to specify parameter
named # using
$this->createUrl('post/read',array('id'=>100,'#'=>'title')).
So in your case
$this->redirect(array('user/view','id'=>$mIntUserId,'#'=>'userList'));

How to get the Facebook iFrame Tab url (including parameters) from within the app?

I think there are a few similar questions that seem to suggest using app_data in the signed request (http://developers.facebook.com/docs/authentication/signed_request/) but I'm not sure if it will be possible to do what I am trying to achieve with it as I've never used it before.
If I have my Facebook 'Tab' Url as follows:
http://www.facebook.com/pages/PAGE_TITLE/PAGE_ID?sk=app_APP_ID
What I want to do is add an extra parameter on the end as follows:
&WT.mc_id=email-uk-8014
The reason for this is for tracking purposes and links will be sent out of the form
http://www.facebook.com/pages/PAGE_TITLE/PAGE_ID?sk=app_APP_ID&WT.mc_id=email-uk-8014
and the extra parameter will allow us to track the campaign id.
As you can see I have no way of knowing the value of the parameter beforehand as it depends on the link clicked by the user so is it possible to somehow get the value of the WT.mc_id parameter inside my iframe app?
app_data is the only parameter passed through other than the page ID and user's basic details (locale and if they do/don't like the page) - you'll need to use that for any sort of campaign tracking (or link elsewhere and redirect to the tab after capturing your analytics data)
you can pass get variables in facebook but only in canvas application
you just have to use $_REQUEST['xxx'] to retrieve the data.
you should not pass the param in href of facebook. Instead just make linking inside your app so that you can track the events. As you will be in iframe and having complete control you can do same on your own site.