Frequent Visitor
Posts: 2
Registered: ‎02-06-2019

Power BI Embedded into WordPress



I need to embed a dashboard into my wordpress. Here is the code I'm trying to embed:


  <script src="C:\Users\jbust\OneDrive\Escritorio\scripts\powerbi.js"></script>
  <div id="captionArea">
    <h1>Power BI Embed</h1>
  <div id="embedContainer" style="height:500px">
    (function () {
      var txtAccessToken = 'txtAccessToken';
      var txtEmbedUrl ='txtEmbedUrl';
      var txtEmbedReportId = 'txtEmbedReportId';	 
     var models = window['powerbi-client'].models;
     var permissions = models.Permissions.Read;
     var config = {
        type: 'report',
        tokenType: models.TokenType.Embed,
        accessToken: txtAccessToken,
        embedUrl: txtEmbedUrl,
        id: txtEmbedReportId,
        permissions: permissions,
		settings: {
          filterPaneEnabled: false,
          navContentPaneEnabled: false
      var embedContainer = document.getElementById('embedContainer');
      var report = powerbi.embed(embedContainer, config);

I don't know much about wordpress or html but when I save this code as .html it works but when I try to paste the code into a new page on my website it doesn't work. I think the problem might be this line of code:


<script src="C:\Users\jbust\OneDrive\Escritorio\scripts\powerbi.js"></script>

But if tried to change it into this:


  <script src=""></script>

Does not work either. 


Any advice would be appreciated!


Thanks in advance