AT.js

Avatar

Avatar
Validate 10
Level 3
tc82
Level 3

Likes

21 likes

Total Posts

64 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 3
tc82
Level 3

Likes

21 likes

Total Posts

64 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
tc82
Level 3

04-11-2016

Hello All,

we have  requirement where we need to use the st.js form target and show the content on the page.

As am new to target integration. 

We did the following steps:

1. Downloaded the at.js

2. Created a html file:

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-route.js"></script>
<script src="at.js"></script>
</head>
<body >
Hello

<div class="Test">
</div>


<div class="mboxDefault"></div>


<script type="text/javascript">

alert('Hi');

adobe.target.getOffer({  
  "mbox": "cardinal-global",  
  "success": function(offers) {  
        console.log('offers', offers);
        adobe.target.applyOffer( { "offer": offers } );
  },  
  "error": function(status, error) {          
      if (console && console.log) {
        console.log('Error:status',status);
        console.log('Error',error);
      }
  }
});

/*window.addEventListener('load',
    function(e) {
    console.log("GREATTTTT");
        adobe.target.getOffer({
            "mbox": "NPS_Right1",
            "params": {
                "trigger": "customEvent"
            },
            "success": function(offer) {
            console.log("SUCESSS");
                adobe.target.applyOffer({
                    offer: offer
                });
            },
            "error": function(status, error) { console.log("statusis :", status);console.log("erroris :", error);}
        });
    }
);*/

/*NPS_Right1
adobe.target.applyOffer({  
  
  "selector": ".cssClass #elementId",
  "offer": [{
    "type": "html",
    "content": "<h5>Hello <b>world!!!</b></h5>"
  }]
});*/

//var sampleApp = angular.module('sampleApp', ['ngRoute', 'adobe.target.directives']);
</script>

<div id="NPS_Right1" data-mboxname="NPS_Right1" mbox class="mboxCreate">
    </div>
</body>
</html>

 

 

am not getting any success back.

all the time getting the error and the message code is "mbox environment is disabled"

 

Can anyone please help me on this issues.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

06-11-2016

Hi , 

Please see the following documentation on getting started with Target Implementation using at.js . Please do let me know in case of any more questions or queries.

https://marketing.adobe.com/resources/help/en_US/target/ov2/c_target-atjs-implementation.html

Thanks & Regards

Parit Mittal

Answers (3)

Answers (3)

Avatar

Avatar
Validate 10
Level 3
tc82
Level 3

Likes

21 likes

Total Posts

64 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 3
tc82
Level 3

Likes

21 likes

Total Posts

64 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
tc82
Level 3

09-11-2016

Thank you everyone for the help.

Below are steps i have followed to have successful output.

1. Created a pageload rule in DTM to use the at.js.

2. Created a web project in eclipse and  used above mentioned code  in this thread.

3. Started the web project and i the integration was successful.

4. Form target we were able to fetch the content for the mbox name we have defined and showed the content on the page.

 

 

Thanks,

Tulasi.

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

09-11-2016

Hi Ankit,

 If you have anything to share specific to above issue then please specify on this thread so that it can benefit the larger community.

Thanks & Regards

Parit Mittal

Avatar

Avatar
Boost 3
Level 2
ankits3107362
Level 2

Likes

3 likes

Total Posts

9 posts

Correct reply

1 solution
Top badges earned
Boost 3
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Boost 3
Level 2
ankits3107362
Level 2

Likes

3 likes

Total Posts

9 posts

Correct reply

1 solution
Top badges earned
Boost 3
Validate 1
Boost 1
Affirm 1
View profile
ankits3107362
Level 2

07-11-2016

Please connect with me on facebook nobdybut@gmail.com