Do we have any way to add google analytic script to fisheye/crucible?

Hi,

I am able to add google analytic script successfully for JIRA under Administrator>System>User Interface>Announcement banner. I want to add google analytics script in fisheye/crucible instance too. Can anybody please let me know how to do that?

Thanks,

Kamal

2 answers

1 accepted

Hi Kamal,

There is no system-wide announcement banner for FishEye/Crucible like JIRA. There are two ways you could do this:

1. If you have a commercial license, you can edit the JSP source to include the announcement banner. Documentation on the JSP source release of FeCru is here.

2. You can build a simple plugin to display the javascript. You could either include the javascript on every page by making it a downloadable plugin resource, or create a "Web Panel" that will be rendered on every page.

Kind Regards,
Richard Stephens

Hi Richard,

Thanks for the quick response. So it means there is no straight forward way to add google analytics script as in jira. I will try the solutions suggested by you.

Thanks again,

Kamal

<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2">
    <plugin-info>
        <description>${project.description}</description>
        <version>${project.version}</version>
        <vendor name="${project.organization.name}" url="${project.organization.url}" />
        <param name="plugin-icon">images/pluginIcon.png</param>
        <param name="plugin-logo">images/pluginLogo.png</param>
    </plugin-info>
     
    <!-- add our i18n resource -->
    <resource type="i18n" name="i18n" location="googleAnalyticsForFisheye"/>
     
    <!-- add our web resources -->
    <web-resource key="googleAnalyticsForFisheye-resources" name="googleAnalyticsForFisheye Web Resources">
        <dependency>com.atlassian.auiplugin:ajs</dependency>
        <resource type="download" name="googleAnalyticsForFisheye.js" location="/js/googleAnalyticsForFisheye.js"/>
        <context>atl.general</context>
    </web-resource>
     
    <!-- publish our component -->
    <component key="myPluginComponent" class="com.sapient.fisheyePlugin.googleAnalyticsForFisheye.MyPluginComponentImpl" public="true">
        <interface>com.sapient.fisheyePlugin.googleAnalyticsForFisheye.MyPluginComponent</interface>
    </component> 
     
    <!-- import from the product container -->
    <component-import key="applicationProperties" interface="com.atlassian.sal.api.ApplicationProperties" />
     
</atlassian-plugin>

Hi Richard,

I am working on to building a simple plugin to display the javascript on every page of fisheye. The plug-in is showing in fisheye "Administration">"System Settings">"Manage Add-ons" but somehow (surely, I am missing somthing or doing it wrong) the javascript is not showing on any of the page of fisheye. Below is my "atlassian-plugin.xml" file. I am having one javascript file at the below mentioned location in xml. Do I need somthing else (some servlet to register web resource) to get javascript on every page of fisheye? Can you please help me with this or suggest me some pointers? I was trying to followhttps://developer.atlassian.com/display/FECRUDEV/Web+Resources


Hi Richard,

I am working on to building a simple plugin to display the javascript on every page of fisheye. The plug-in is showing in fisheye "Administration">"System Settings">"Manage Add-ons" but somehow (surely, I am missing somthing or doing it wrong) the javascript is not showing on any of the page of fisheye. Below is my "atlassian-plugin.xml" file. I am having one javascript file at the below mentioned location. Do I need somthing else (some servlet to register web resource) to get javascript on every page of fisheye? Can you please help me with this of suggest me some pointers? I was trying to follow https://developer.atlassian.com/display/FECRUDEV/Web+Resources

<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2">
    <plugin-info>
        <description>${project.description}</description>
        <version>${project.version}</version>
        <vendor name="${project.organization.name}" url="${project.organization.url}" />
        <param name="plugin-icon">images/pluginIcon.png</param>
        <param name="plugin-logo">images/pluginLogo.png</param>
    </plugin-info>
	
    <!-- add our i18n resource -->
    <resource type="i18n" name="i18n" location="googleAnalyticsForFisheye"/>
    
    <!-- add our web resources -->
    <web-resource key="googleAnalyticsForFisheye-resources" name="googleAnalyticsForFisheye Web Resources">
        <dependency>com.atlassian.auiplugin:ajs</dependency>
        <resource type="download" name="googleAnalyticsForFisheye.js" location="/js/googleAnalyticsForFisheye.js"/>
        <context>atl.general</context>
    </web-resource>
    
    <!-- publish our component -->
    <component key="myPluginComponent" class="com.sapient.fisheyePlugin.googleAnalyticsForFisheye.MyPluginComponentImpl" public="true">
        <interface>com.sapient.fisheyePlugin.googleAnalyticsForFisheye.MyPluginComponent</interface>
    </component> 
    
    <!-- import from the product container -->
    <component-import key="applicationProperties" interface="com.atlassian.sal.api.ApplicationProperties" />
    
</atlassian-plugin>

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 6 hours ago in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

48 views 0 1
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you