Uploading Data through data source using Adobe Analytics API 1.4

This is to test that what happen to data sources FTP location when data source data is uploaded through API 1.4 using postman

1.Create the data source through Analytics UI

  • Login to SC 15
  • Click on Admin->Data Sources

2.Create Transaction ID data sources

3.Using Postman send POST request on https://api.omniture.com/admin/1.4/rest/?method=DataSources.UploadData

4.In Pre-request Script

var uuid = function() {};

uuid.v4 = function() {

    return ‘xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx’.replace(/[xy]/g, function(c) { var r = Math.random()*16|0, v = c == ‘x’ ? r : (r&0x3|0x8); return v.toString(16); });


var WSSE = function(username, secret) {

    this.username = username;

    this.secret = secret;


WSSE.prototype.getHeader = function() {

    var nonce = uuid.v4();

    var created = new Date().toISOString();

    var hashString = nonce + created + this.secret;

    var digest = CryptoJS.SHA256(hashString).toString(CryptoJS.enc.Base64);

    var b64nonce = CryptoJS.enc.Latin1.parse(nonce).toString(CryptoJS.enc.Base64);

    var header = “UsernameToken”;

    header += ” Username=\”” + this.username + “\”,”;

    header += ” PasswordDigest=\”” + digest + “\”,”;

    header += ” Nonce=\”” + b64nonce + “\”,”;

    header += ” Created=\”” + created + “\”,”;

    header += ” Algorithm=\”SHA256\””;

    return { ‘X-WSSE’: header };


var wsse = new WSSE(‘shared secret’, ‘password’);

postman.setEnvironmentVariable(“x-wsse”, wsse.getHeader()[‘X-WSSE’])

5.Under body


  “columns”: [






  “dataSourceID”: “2”,

  “jobName”: “Product returned”,

  “reportSuiteID”: “lscsgeekourpc”,

  “rows”: [









6.Under Header set WSSE


For API 1.4 documentation check : https://github.com/AdobeDocs/analytics-1.4-apis

Note :Grab the data source ID from the URL when you open the data source in UI

Once it appears true as result than in FTP of Data source a SOAP folder is created which have a file of data source, later on, which process.

Processing pauses if the size exceeds 50 MB and does not resume until the total is below 50 MB. To limit delays in generating reports, do not upload more than 90 days of data per day.

Reference : https://marketing.adobe.com/resources/help/en_US/sc/datasources/datasrc_faq.html

Product String in Adobe Launch

If you have single product to pass then you can use the extension in Launch but if you have multiple products then don’t use the extension in Launch.

Use custom code option in Rule of Launch ,sample code is shown below:

for (i = 0; i < digitalData.transaction.item.length; i++)


var sku = digitalData.transaction.item[i].productInfo.sku;

var units = digitalData.transaction.item[i].productInfo.units;

var price = digitalData.transaction.item[i].productInfo.checkoutPrice;

var test=test+”;” + sku + “;” + units + “;” + price + “;,”;



Do the changes in code as per your requirement.

How to Capture multiple query parameters in the s.util.getQueryparam

Requirement : Want to capture the multiple query parameters in s.campaign variable of Adobe Analytics.


Use the following code:

s.campaign = s.Util.getQueryParam(‘cmpid’)+”:”+s.Util.getQueryParam(‘source’)+”:”+s.Util.getQueryParam (‘medium’);

Result: s.campaign =hhhh:ssss:dddd

Automation Software Zapier & IFTTT

Zapier is automation software allowing one business app to speak to another app,it is very similar to product called IFTTT,which is little more open-sourced but this is more business focused.It allows to take repeating tasks and automate them even across different applications.It can be an enormous time-saver.IFTTT is free and Zapier has paid model.

Code To Upload File on FTP Using Python Script

Recently I was working on a project and wanted to upload a file on FTP using Python.

import ftplib
from ftplib import FTP

File2Send = ‘file path’
#To upload file in root directory of FTP location
Output_Directory = “”

ftp = FTP(“ftp.ourpcgeek.com”)
file = open(File2Send, “rb”)
ftp.storbinary(‘STOR ‘ + File2Send, file)
print (“STORing File now…”)
print(“Processign end”)

Following is the code snippet which you can use in case you want to upload file on FTP using Python script:

import ftplib

from ftplib import FTP

File2Send = ‘C:\\Users\\shamshul\\Pictures\\Saved Pictures\\test1.txt’

Output_Directory = “/upload”

   ftp = FTP(“ftp.ourpcgeek.com”)


   file = open(File2Send, “rb”)


   ftp.storbinary(‘STOR ‘ + File2Send, file)

   print (“STORing File now…”)



How to track survey score through Adobe Analytics?

Almost all the companies have surveyed and want to keep track of it for the holistic view of customer satisfaction.

In a survey the possible outcome of a score that can be any of the following numbers- 0,1,2,3,4,5,6,7,8,9,10

The business question can be that what is the best way to capture this score to then be able to calculate the average score through Adobe Analytics.

In Adobe Analytics there is no predefined formula that it can be implemented.

While solving this business problem I came up with two methods.

Method 1:

Step 1 : Take an eVar with the following setting

Step 2: Take an event with the following settings

Step 3: Create a calculate metric

Final Report:

Method 2:

  1. Take an eVar which capture the score
  2. Take counter event which captures the score
  3. Take numeric event to capture the score in the numeric format
  4. Create a calculated metric with the following settings.


Final Report:

Please let me know if you have any doubt through comment section, will be happy to reply on it.

Why segment is missing in Data Connector?

Data Connector is formerly known as Genesis. Adobe Data Connectors provide a complete development ecosystem to help Data Connectors partners integrate their products and services into the Adobe Experience Cloud.

Segment created in Adobe Analytics can be reused in Data Connector as Remarketing Segment.
Sometimes the segment is not available in Data Connector. There can be multiple reasons for it like

1. Data Connector owner does not have access to segment
2.The segment is not shared to owner

The major point often get missed, is the compatibility.If the segment is not compatible to Data Warehouse then it will not be available under Data Connector for re-marketing segment.

Google enters e-commerce, beware!

Search engine giant has launched search engine features in India.The user can easily put filter as per choice and browser products only rather than going to a different shopping website and checking the product.
Might be alarming for Amazon and Flipkart but good for the consumers.

Google unveiled ‘Google Shopping’ on their search page. Customers will be able to see trending products through this across different categories.

For retailers, Google is offering ‘Merchant Center’ in Hindi, which allows the seller to list their products for Google Shopping, without paying for ad campaigns.
India has 410 million internet users, however, only one-third shopped online.
As said by Google officials, Google Shopping will be a connector between retailer and consumers, the transaction and delivery of products will be done by the merchant.

Adobe Analytics Connector with PowerBI


With the introduction of new Adobe Analytics connector with PowerBI (Partnership with Microsoft), it becomes very easy to load Adobe Analytics data into PowerBI and perform the analysis.

After launching the connector, it has to be authenticated by Adobe ID.

Complete steps are well explained in the video below:

On web Connect to Adobe Analytics with Power BI

Hope this article was helpful if you have a question then feel free to comment below and share to your friends.