action-destinations icon indicating copy to clipboard operation
action-destinations copied to clipboard

Add more Fullstory settings

Open dja opened this issue 1 year ago • 9 comments

Adds other Fullstory settings for configuring the fullstory-browser-sdk to allow for custom domain specification and other features supported by the SDK. https://github.com/fullstorydev/fullstory-browser-sdk?tab=readme-ov-file#initialize-the-sdk https://help.fullstory.com/hc/en-us/articles/18612999473175-How-to-send-captured-traffic-to-FullStory-using-Custom-Endpoints

Testing

Include any additional information about the testing you have completed to ensure your changes behave as expected. For a speedy review, please check any of the tasks you completed below during your testing.

  • [ ] Added unit tests for new functionality
  • [ ] Tested end-to-end using the local server
  • [ ] [Segmenters] Tested in the staging environment

dja avatar Mar 08 '24 18:03 dja

hi @dja - thanks for raising this PR. Is there code missing from the PR? All I see are some added Setting definitions, but the logic to make use of those definitions is missing from the code. Can you please check / clarify? Kind regards, Joe

joe-ayoub-segment avatar Mar 11 '24 08:03 joe-ayoub-segment

hi @dja - thanks for raising this PR. Is there code missing from the PR? All I see are some added Setting definitions, but the logic to make use of those definitions is missing from the code. Can you please check / clarify? Kind regards, Joe

Hi Joe, This is my first time contributing to the codebase and wasn't able to generate types or find anywhere else to setup the browser destination for the new settings definitions. Do you have any recommendations on what else is needed?

Thanks!

dja avatar Mar 11 '24 16:03 dja

Hi Daniel,

There's a couple of things to do:

  1. (Done) You added some new field definitions.
  2. You need to update the generated-types.ts file by running this command: ./bin/run generate:types
  3. In the perform() function code block you'll need to make use of the new field definitions.

Have a look through this video to get an understanding of how to build an Integration with Segment. https://www.loom.com/share/d39a43b187f04945a80253b852979766 Also, here is a video which covers some basics about Segment. https://www.loom.com/share/a447434a439e419db5493c66b24e4378

Have a look at the videos and if you still can't figure it out or it's taking too much time to figure it out please let me know and we can schedule a call.

Best regards, Joe

On Mon, Mar 11, 2024 at 4:30 PM Daniel Jacob Archer < @.***> wrote:

hi @dja https://urldefense.com/v3/__https://github.com/dja__;!!NCc8flgU!aBEM5vfR2yQu3gOaMV37na6uBK2tsJGi1QtdsgFWZIc5XG_k81vPAapMT7tEc3AytXhxMwN6fWMxZ6xBKNMlc9-o_w$

  • thanks for raising this PR. Is there code missing from the PR? All I see are some added Setting definitions, but the logic to make use of those definitions is missing from the code. Can you please check / clarify? Kind regards, Joe

Hi Joe, This is my first time contributing to the codebase and wasn't able to generate types or find anywhere else to setup the browser destination for the new settings definitions. Do you have any recommendations on what else is needed?

Thanks!

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/segmentio/action-destinations/pull/1918*issuecomment-1988864484__;Iw!!NCc8flgU!aBEM5vfR2yQu3gOaMV37na6uBK2tsJGi1QtdsgFWZIc5XG_k81vPAapMT7tEc3AytXhxMwN6fWMxZ6xBKNOQNPJe4g$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AK2F3MBSMQLGQGT6MGTZWFDYXXS4BAVCNFSM6AAAAABENIOJHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBYHA3DINBYGQ__;!!NCc8flgU!aBEM5vfR2yQu3gOaMV37na6uBK2tsJGi1QtdsgFWZIc5XG_k81vPAapMT7tEc3AytXhxMwN6fWMxZ6xBKNOVWzAYxA$ . You are receiving this because you were assigned.Message ID: @.***>

joe-ayoub-segment avatar Mar 11 '24 17:03 joe-ayoub-segment

hi @dja - just checking if this PR is something you still want to proceed with?

joe-ayoub-segment avatar Mar 25 '24 16:03 joe-ayoub-segment

hi @dja - just checking if this PR is something you still want to proceed with?

Thanks for checking Joe - I think it'd be better if someone else took this on. For now, we've applied a monkey patch on our end to circumvent the limitation.

dja avatar Mar 25 '24 19:03 dja

Thanks @dja - who's the best person to follow up with?

joe-ayoub-segment avatar Mar 26 '24 11:03 joe-ayoub-segment

I believe an engineer from Fullstory has reached out to your team?

dja avatar Mar 27 '24 15:03 dja

I believe an engineer from Fullstory has reached out to your team?

Hi @dja - I don't believe that anyone has been in touch. Is there someone you can connect me with please? my email is [email protected]

joe-ayoub-segment avatar Apr 02 '24 11:04 joe-ayoub-segment

+1 to this!

jaGarcia avatar Jul 12 '24 13:07 jaGarcia

hi @dja - I'm going to close this PR due to inactivitly. Feel free to reopen it when you'd like to make progress. Best regards, Joe

joe-ayoub-segment avatar Aug 05 '24 09:08 joe-ayoub-segment

for those who come later into this issue trying to find a solution, and until Segment makes this config native, here's a workaround I created using Cloudflare Workers (acting as full reverse proxy):

// Instantiate the API to run on specific elements, for example, head, divconst rewriter = new HTMLRewriter() //.on` attaches the element handler and this allows you to match on element/attributes or to use the specific methods per the API .on('head', { element(element) {

				/**
				 * In this case, you are using `append` to add a new script to the `head` element
				 * This tactic is to prevent Segment's "Fullstory Web Destination" from overwriting it
				 */
				element.append(`
				  <script type="text/javascript">
						Object.defineProperties(window, {
							_fs_host: {
								get: function() {
									return 'insights.yourdomain.com';
								},
								set: function(val) {
									// console.log('thank you, but no');
								}
							}
						});

						Object.defineProperties(window, {
							_fs_script: {
								get: function() {
									return 'insights.yourdomain.com/s/fs.js';
								},
								set: function(val) {
									// console.log('thank you, but no');
								}
							}
						});

						Object.defineProperties(window, {
							_fs_app_host: {
								get: function() {
									return 'app.fullstory.com';
								},
								set: function(val) {
									// console.log('thank you, but no');
								}
							}
						});

							// console.log('Altered FS Path');
				  </script>`, { html: true });
			}
		});`

jaGarcia avatar Aug 05 '24 14:08 jaGarcia